Skip to content

Commit

Permalink
Minimise permissions for workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jspc committed Oct 2, 2022
1 parent da5a666 commit 7dd80a0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ env:
jobs:
test:
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v3

Expand Down Expand Up @@ -49,6 +50,7 @@ jobs:
sonarcloud:
needs: test
runs-on: ubuntu-latest
permissions: read-all
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -69,6 +71,10 @@ jobs:

build-and-push:
needs: sonarcloud
permissions:
packages: write
contents: write

runs-on: ubuntu-latest
if: contains(github.ref, 'refs/tags')
steps:
Expand Down

0 comments on commit 7dd80a0

Please sign in to comment.