Skip to content

Commit

Permalink
Merge pull request #2819 from boahc077/github_actions_token_permission
Browse files Browse the repository at this point in the history
ci: add minimum GitHub token permissions for workflows
  • Loading branch information
WardBrian authored Oct 18, 2022
2 parents ca7ae52 + 67a1a9d commit b3da945
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
12 changes: 12 additions & 0 deletions .github/workflows/header_checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,14 @@ on:
- 'README.md'
- 'RELEASE-NOTES.txt'

permissions:
contents: read

jobs:
windows:
permissions:
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
contents: read # for actions/checkout to fetch code
name: Windows
runs-on: windows-latest

Expand Down Expand Up @@ -47,6 +53,9 @@ jobs:
run: make -j2 test-headers

opencl:
permissions:
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
contents: read # for actions/checkout to fetch code
name: OpenCL
runs-on: ubuntu-latest

Expand All @@ -64,6 +73,9 @@ jobs:
echo "STAN_OPENCL=true" > make/local
make -j2 test-headers
no_range_checks:
permissions:
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
contents: read # for actions/checkout to fetch code
name: NoRange
runs-on: ubuntu-latest

Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,14 @@ on:
- 'LICENSE.md'
- 'README.md'
- 'RELEASE-NOTES.txt'
permissions:
contents: read

jobs:
prim-rev:
permissions:
actions: write # for n1hility/cancel-previous-runs to create & stop workflow runs
contents: read # for actions/checkout to fetch code
name: prim and rev tests
runs-on: windows-latest

Expand Down

0 comments on commit b3da945

Please sign in to comment.