Skip to content
This repository was archived by the owner on Jul 30, 2025. It is now read-only.

Commit ac4c657

Browse files
committed
[gha] allow external contributors build/lint
1 parent 24f4686 commit ac4c657

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,16 +4,28 @@ 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

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

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

0 commit comments

Comments
 (0)