Skip to content

Commit

Permalink
add package write permission in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Yuuichi Asahi committed Jan 27, 2025
1 parent c6b272b commit 4c8402e
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/__build_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ env:
jobs:
build_base:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

strategy:
matrix:
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/build_test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ jobs:
if: ${{ needs.check_docker_files.outputs.docker_files_have_changed == 'true' }}

uses: ./.github/workflows/__build_base.yaml
permissions:
contents: read
packages: write

with:
image_suffix: ${{ needs.check_docker_files.outputs.image_suffix }}
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/pre_build_base.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,10 @@ jobs:
build_base:
needs: check_docker_files

permissions:
contents: read
packages: write

# run inconditionnaly on schedule or manual mode or if Docker files changed on other modes
if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' || needs.check_docker_files.outputs.docker_files_have_changed == 'true' }}

Expand Down

0 comments on commit 4c8402e

Please sign in to comment.