Skip to content

Commit

Permalink
[CI] Add workflow permissions
Browse files Browse the repository at this point in the history
Add a `permissions` section to all workflow files to allow third-party GitHub
actions to have read permissions.  This will fix the issue where the
`dorny/paths-filter` step doesn't have proper read permissions to query the file
list modified in a pull request, resulting in a hard error from the GitHub APIs
it uses.
  • Loading branch information
JoeLoser committed Mar 26, 2024
1 parent 5b6b576 commit db2aa94
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/workflows/buildAndTestMojoOSS.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

permissions:
contents: read
pull-requests: read

jobs:
test-pre-submit:
runs-on: ubuntu-latest
Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ on:
types: [opened, synchronize, reopened, ready_for_review]
workflow_dispatch:

permissions:
contents: read
pull-requests: read

jobs:
test-examples:
runs-on: ubuntu-latest
Expand Down

0 comments on commit db2aa94

Please sign in to comment.