Skip to content

Commit

Permalink
ci(push-image): explicitly specify package:write permission
Browse files Browse the repository at this point in the history
Signed-off-by: Thuan Vo <thvo@redhat.com>
  • Loading branch information
Thuan Vo committed Aug 26, 2023
1 parent 2d191af commit af3af62
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions .github/workflows/pr-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@ jobs:
check-before-build:
runs-on: ubuntu-latest
if: github.repository_owner == 'cryostatio' && github.event.issue.pull_request && startsWith(github.event.comment.body, '/build_test')
permissions:
pull-requests: write
steps:
- name: Fail if needs-triage label applied
if: ${{ contains(github.event.issue.labels.*.name, 'needs-triage') }}
Expand Down Expand Up @@ -46,10 +48,6 @@ jobs:
checkout-branch:
runs-on: ubuntu-latest
needs: [check-before-build]
permissions:
contents: read
issues: read
pull-requests: read
outputs:
PR_head_ref: ${{ fromJSON(steps.comment-branch.outputs.result).ref }}
PR_head_sha: ${{ fromJSON(steps.comment-branch.outputs.result).sha }}
Expand Down Expand Up @@ -87,15 +85,18 @@ jobs:

push-to-ghcr:
runs-on: ubuntu-latest
needs: [build-and-test, checkout-branch]
strategy:
matrix:
arch: [amd64, arm64]
outputs:
amd64_image: ${{ steps.amd64_image.outputs.image }}
arm64_image: ${{ steps.arm64_image.outputs.image }}
needs: [build-and-test, checkout-branch]
env:
head_sha: ${{ needs.checkout-branch.outputs.PR_head_sha }}
permissions:
packages: write
actions: read
steps:
- uses: actions/download-artifact@v3
with:
Expand Down

0 comments on commit af3af62

Please sign in to comment.