Skip to content

Commit

Permalink
fix: (#422) add missing job permissions out of convenience reasons
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasAugustin committed Dec 30, 2023
1 parent 8b00619 commit 89329a8
Show file tree
Hide file tree
Showing 8 changed files with 38 additions and 10 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/actions_template_sync.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ on:
jobs:
repo-sync:
runs-on: ubuntu-latest
permissions:
contents: write
pull-requests: write

steps:
# To use this repository's private action, you must check out the repository
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ jobs:
call_test_all:
uses: ./.github/workflows/test_all.yml
secrets: inherit
permissions:
contents: write
pull-requests: write
call_release_please:
needs:
- call_shellcheck
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
jobs:
test-implementation-job:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
Expand Down
12 changes: 12 additions & 0 deletions .github/workflows/test_all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,24 @@ jobs:
call_test_hooks:
uses: ./.github/workflows/test_hooks.yml
secrets: inherit
permissions:
contents: write
pull-requests: write
call_test_ssh_gitlab:
uses: ./.github/workflows/test_ssh_gitlab.yml
secrets: inherit
permissions:
contents: write
pull-requests: write
call_test_ssh:
uses: ./.github/workflows/test_ssh.yml
secrets: inherit
permissions:
contents: write
pull-requests: write
call_test:
uses: ./.github/workflows/test.yml
secrets: inherit
permissions:
contents: write
pull-requests: write
4 changes: 3 additions & 1 deletion .github/workflows/test_hooks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
jobs:
test-implementation-job:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_ssh.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
jobs:
test-implementation-job:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
Expand Down
4 changes: 3 additions & 1 deletion .github/workflows/test_ssh_gitlab.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ on:
jobs:
test-implementation-job:
runs-on: ubuntu-latest

permissions:
contents: write
pull-requests: write
steps:
# To use this repository's private action, you must check out the repository
- name: Checkout
Expand Down
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ on:
jobs:
repo-sync:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
pull-requests: write

steps:
# To use this repository's private action, you must check out the repository
Expand All @@ -89,9 +93,6 @@ jobs:

- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v1.1.8
permissions:
content: write
pull-requests: write
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: <owner/repo>
Expand Down Expand Up @@ -152,6 +153,10 @@ It is also possible to use a different git provider, e.g. GitLab.
jobs:
repo-sync:
runs-on: ubuntu-latest
# https://docs.github.com/en/actions/using-jobs/assigning-permissions-to-jobs
permissions:
contents: write
pull-requests: write
steps:
# To use this repository's private action, you must check out the repository
Expand All @@ -162,9 +167,6 @@ jobs:
- name: actions-template-sync
uses: AndreasAugustin/actions-template-sync@v1.1.8
permissions:
content: write
pull-requests: write
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
source_repo_path: ${{ secrets.SOURCE_REPO_PATH }} # <owner/repo>, should be within secrets
Expand Down

0 comments on commit 89329a8

Please sign in to comment.