Skip to content

Commit

Permalink
Auto merge of rust-lang#3909 - Kobzol:ci-permissions, r=RalfJung
Browse files Browse the repository at this point in the history
Scope CI permissions to the job that needs it

I scoped the permissions only to the job that requires them.
  • Loading branch information
bors committed Sep 24, 2024
2 parents d47e254 + 8885ae9 commit 878925e
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 878925e

Please sign in to comment.