Skip to content

Commit 96f2a31

Browse files
fix(ci): another attempt for contributors (#3584)
1 parent c4afd61 commit 96f2a31

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/dev-docker.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ jobs:
1414
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
1515
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) ||
1616
github.event_name == 'push'
17+
environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'external-contributor' || null }}
1718
strategy:
1819
matrix:
1920
# ubuntu-latest leverages larger GH runner pool & completes in ~30s instead of ~3m
@@ -24,7 +25,8 @@ jobs:
2425
packages: write
2526
steps:
2627
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
27-
28+
with:
29+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
2830
- name: generate or hydrate protos
2931
uses: ./.github/actions/genprotos
3032

.github/workflows/flow.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ jobs:
1818
(github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name == github.repository) ||
1919
(github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) ||
2020
github.event_name == 'push'
21+
environment: ${{ (github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository) && 'external-contributor' || null }}
2122
strategy:
2223
fail-fast: false
2324
matrix:
@@ -87,7 +88,8 @@ jobs:
8788

8889
steps:
8990
- uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5
90-
91+
with:
92+
ref: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.sha || github.ref }}
9193
- name: generate or hydrate protos
9294
uses: ./.github/actions/genprotos
9395

0 commit comments

Comments
 (0)