Skip to content

Commit c246e66

Browse files
authored
chore(ci): propagate checkout permission to nested workflows (#2642)
1 parent cdd28fe commit c246e66

File tree

5 files changed

+6
-2
lines changed

5 files changed

+6
-2
lines changed

.github/workflows/label_pr_on_title.yml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
get_pr_details:
3434
permissions:
3535
actions: read # download PR artifact
36+
contents: read # checkout code
3637
# Guardrails to only ever run if PR recording workflow was indeed
3738
# run in a PR event and ran successfully
3839
if: ${{ github.event.workflow_run.conclusion == 'success' }}

.github/workflows/on_label_added.yml

+1
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@ jobs:
3232
get_pr_details:
3333
permissions:
3434
actions: read # download PR artifact
35+
contents: read # checkout code
3536
if: ${{ github.event.workflow_run.conclusion == 'success' }}
3637
uses: ./.github/workflows/reusable_export_pr_details.yml
3738
with:

.github/workflows/on_merged_pr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
get_pr_details:
3434
permissions:
3535
actions: read # download PR artifact
36+
contents: read # checkout code
3637
if: github.event.workflow_run.event == 'pull_request' && github.event.workflow_run.conclusion == 'success'
3738
uses: ./.github/workflows/reusable_export_pr_details.yml
3839
with:

.github/workflows/on_opened_pr.yml

+1
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ jobs:
3333
get_pr_details:
3434
permissions:
3535
actions: read # download PR artifact
36+
contents: read # checkout code
3637
if: ${{ github.event.workflow_run.conclusion == 'success' }}
3738
uses: ./.github/workflows/reusable_export_pr_details.yml
3839
with:

.github/workflows/on_pr_updates.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ name: PR requirements
1717
# due to limitations in GH API.
1818

1919
on:
20-
pull_request:
20+
pull_request:
2121
types:
2222
- opened
2323
- labeled
@@ -26,7 +26,7 @@ on:
2626
permissions: {} # no permission required
2727

2828
jobs:
29-
fail-for-draft:
29+
check-requirements:
3030
runs-on: ubuntu-latest
3131
steps:
3232
- name: Block if it doesn't minimum requirements

0 commit comments

Comments
 (0)