chore: add minimal workflow permissions (#70)
This commit is contained in:
parent
4a7045f1b4
commit
1af4050abd
|
@ -15,13 +15,25 @@ on:
|
|||
|
||||
workflow_dispatch:
|
||||
|
||||
permissions:
|
||||
actions: none
|
||||
checks: none
|
||||
contents: read
|
||||
deployments: none
|
||||
issues: none
|
||||
packages: none
|
||||
pull-requests: none
|
||||
repository-projects: none
|
||||
security-events: none
|
||||
statuses: none
|
||||
|
||||
jobs:
|
||||
# Quick checks, running linters, checking formatting, etc
|
||||
quick:
|
||||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: styfle/cancel-workflow-action@0.9.0
|
||||
|
||||
- name: Checkout
|
||||
|
@ -49,7 +61,7 @@ jobs:
|
|||
name: images/${{ matrix.job}}
|
||||
steps:
|
||||
- name: Cancel previous runs
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
if: github.event_name == 'pull_request'
|
||||
uses: styfle/cancel-workflow-action@0.9.0
|
||||
|
||||
- name: Checkout
|
||||
|
@ -61,14 +73,14 @@ jobs:
|
|||
--tag=${{ matrix.job }}
|
||||
|
||||
- name: Authenticate to Docker Hub
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: docker/login-action@v1
|
||||
with:
|
||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||
|
||||
- name: Push images to Docker Hub
|
||||
if: ${{ github.event_name != 'pull_request' }}
|
||||
if: github.event_name != 'pull_request'
|
||||
run: |
|
||||
${{ github.workspace}}/scripts/push_images.sh \
|
||||
--tag=${{ matrix.job}}
|
||||
|
|
Loading…
Reference in New Issue