Skip to content

Commit 7675e73

Browse files
committed
[gha] allow external contributors build/lint
1 parent 067b1ec commit 7675e73

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,27 @@ on:
44
push:
55
branches:
66
- main
7-
pull_request:
7+
pull_request_target:
8+
branches:
9+
- 06-18-_gha_allow_external_contributors_build_lint # canary for the PR that introduces pull_request_target
810

911
permissions:
1012
contents: read
1113
id-token: write #required for GCP Workload Identity federation which we use to login into Google Artifact Registry
1214

1315
jobs:
16+
permission-check:
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Check repository permission for user which triggered workflow
20+
uses: sushichop/action-repository-permission@13d208f5ae7a6a3fc0e5a7c2502c214983f0241c
21+
with:
22+
required-permission: write
23+
comment-not-permitted: Sorry, you don't have permission to trigger this workflow.
24+
1425
lint:
1526
runs-on: ubuntu-latest
27+
needs: permission-check # This is required to ensure we have permission to build against the GCP Artifact Registry
1628

1729
steps:
1830
- uses: actions/checkout@v4

0 commit comments

Comments
 (0)