Skip to content

Commit

Permalink
Scope CI permissions to the job that needs it
Browse files Browse the repository at this point in the history
  • Loading branch information
Kobzol committed Sep 24, 2024
1 parent d47e254 commit 8885ae9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/tools/miri/.github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,6 @@ on:
schedule:
- cron: '44 4 * * *' # At 4:44 UTC every day.

permissions:
# The cronjob needs to be able to push to the repo...
contents: write
# ... and create a PR.
pull-requests: write

defaults:
run:
shell: bash
Expand Down Expand Up @@ -93,6 +87,11 @@ jobs:
cron-fail-notify:
name: cronjob failure notification
runs-on: ubuntu-latest
permissions:
# The cronjob needs to be able to push to the repo...
contents: write
# ... and create a PR.
pull-requests: write
needs: [build, style]
if: github.event_name == 'schedule' && failure()
steps:
Expand Down

0 comments on commit 8885ae9

Please sign in to comment.