Skip to content

Commit

Permalink
Fix GitHub Actions workflow permissions (#574)
Browse files Browse the repository at this point in the history
  • Loading branch information
nscuro authored Feb 14, 2024
1 parent 4ec6112 commit e98adda
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/workflows/_meta-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,7 @@ jobs:
build-container:
runs-on: ubuntu-latest
permissions:
packages: write # Required to push images to ghcr.io
security-events: write # Required to upload trivy's SARIF output
needs:
- build-java
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ jobs:
app-version: "snapshot"
publish-container: ${{ github.ref == 'refs/heads/main' }}
permissions:
packages: write # Required to push images to ghcr.io
security-events: write # Required to upload trivy's SARIF output
secrets:
registry-0-usr: ${{ github.repository_owner }}
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci-publish.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@ jobs:
app-version: ${{ needs.read-version.outputs.version }}
publish-container: true
permissions:
packages: write # Required to push images to ghcr.io
security-events: write # Required to upload trivy's SARIF output
secrets:
registry-0-usr: ${{ github.repository_owner }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/ci-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ jobs:
create-release:
runs-on: ubuntu-latest
permissions:
# Required for pushing changes via git command (rather than via GitHub API).
# TODO: Use bot credentials for git, or rewrite the "Commit Version" step to use API instead.
contents: write
needs:
- prepare-release

Expand Down

0 comments on commit e98adda

Please sign in to comment.