mirror of
https://github.com/withastro/astro.git
synced 2024-12-30 22:03:56 -05:00
Check permissions for workflows (#12181)
This commit is contained in:
parent
9988dd67e2
commit
a55ce2977f
3 changed files with 17 additions and 3 deletions
7
.github/workflows/benchmark.yml
vendored
7
.github/workflows/benchmark.yml
vendored
|
@ -20,6 +20,13 @@ jobs:
|
||||||
PR-BENCH: ${{ steps.benchmark-pr.outputs.BENCH_RESULT }}
|
PR-BENCH: ${{ steps.benchmark-pr.outputs.BENCH_RESULT }}
|
||||||
MAIN-BENCH: ${{ steps.benchmark-main.outputs.BENCH_RESULT }}
|
MAIN-BENCH: ${{ steps.benchmark-main.outputs.BENCH_RESULT }}
|
||||||
steps:
|
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
|
# https://github.com/actions/checkout/issues/331#issuecomment-1438220926
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
|
|
7
.github/workflows/preview-comment.yml
vendored
7
.github/workflows/preview-comment.yml
vendored
|
@ -13,6 +13,13 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
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: |
|
- run: |
|
||||||
gh issue edit ${{ github.event.issue.number }} --add-label "pr: preview" --repo ${{ github.repository }}
|
gh issue edit ${{ github.event.issue.number }} --add-label "pr: preview" --repo ${{ github.repository }}
|
||||||
env:
|
env:
|
||||||
|
|
6
.github/workflows/snapshot-release.yml
vendored
6
.github/workflows/snapshot-release.yml
vendored
|
@ -25,10 +25,10 @@ jobs:
|
||||||
issues: write
|
issues: write
|
||||||
pull-requests: write
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- name: "Check if user has write access"
|
- name: Check if user has write access
|
||||||
uses: "lannonbr/repo-permission-check-action@2.0.2"
|
uses: lannonbr/repo-permission-check-action@2.0.2
|
||||||
with:
|
with:
|
||||||
permission: "write"
|
permission: write
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue