0
Fork 0
mirror of https://github.com/withastro/astro.git synced 2024-12-16 21:46:22 -05:00

Check permissions for workflows (#12181)

This commit is contained in:
Bjorn Lu 2024-10-10 22:35:22 +08:00 committed by GitHub
parent 9988dd67e2
commit a55ce2977f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
3 changed files with 17 additions and 3 deletions

View file

@ -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/repo-permission-check-action@2.0.2
with:
permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
- uses: actions/checkout@v4
with:

View file

@ -13,6 +13,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Check if user has write access
uses: lannonbr/repo-permission-check-action@2.0.2
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:

View file

@ -25,10 +25,10 @@ jobs:
issues: write
pull-requests: write
steps:
- name: "Check if user has write access"
uses: "lannonbr/repo-permission-check-action@2.0.2"
- name: Check if user has write access
uses: lannonbr/repo-permission-check-action@2.0.2
with:
permission: "write"
permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}