Skip to content

Commit

Permalink
Check permissions for workflows (#12181)
Browse files Browse the repository at this point in the history
  • Loading branch information
bluwy authored Oct 10, 2024
1 parent 9988dd6 commit a55ce29
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,13 @@ jobs:
PR-BENCH: ${{ steps.benchmark-pr.outputs.BENCH_RESULT }}
MAIN-BENCH: ${{ steps.benchmark-main.outputs.BENCH_RESULT }}
steps:
- name: Check if user has write access
uses: lannonbr/[email protected]
with:
permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
- uses: actions/checkout@v4
with:
Expand Down
7 changes: 7 additions & 0 deletions .github/workflows/preview-comment.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,13 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Check if user has write access
uses: lannonbr/[email protected]
with:
permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- run: |
gh issue edit ${{ github.event.issue.number }} --add-label "pr: preview" --repo ${{ github.repository }}
env:
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/snapshot-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,10 @@ jobs:
issues: write
pull-requests: write
steps:
- name: "Check if user has write access"
uses: "lannonbr/[email protected]"
- name: Check if user has write access
uses: lannonbr/[email protected]
with:
permission: "write"
permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

Expand Down

0 comments on commit a55ce29

Please sign in to comment.