Skip to content

Commit 5867f5e

Browse files
sjmonsonCopilot
authored andcommitted
Revert pull_request_target (#225)
`pull_request_target` has not been the drop-in replacement it promises to be. Revert its addition and disable build jobs for external PRs. --------- Co-authored-by: Copilot <[email protected]> Signed-off-by: dalthecow <[email protected]>
1 parent 06f40e6 commit 5867f5e

File tree

1 file changed

+4
-21
lines changed

1 file changed

+4
-21
lines changed

.github/workflows/development.yml

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ jobs:
1212
python: ["3.9", "3.13"]
1313
steps:
1414
- uses: actions/checkout@v4
15-
with:
16-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
1715
- name: Set up Python
1816
uses: actions/setup-python@v5
1917
with:
@@ -30,8 +28,6 @@ jobs:
3028
steps:
3129
- name: Check out code
3230
uses: actions/checkout@v4
33-
with:
34-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
3531

3632
- name: Set up Node.js 22
3733
uses: actions/setup-node@v4
@@ -51,8 +47,6 @@ jobs:
5147
python: ["3.9", "3.13"]
5248
steps:
5349
- uses: actions/checkout@v4
54-
with:
55-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
5650
- name: Set up Python
5751
uses: actions/setup-python@v5
5852
with:
@@ -69,8 +63,6 @@ jobs:
6963
steps:
7064
- name: Check out code
7165
uses: actions/checkout@v4
72-
with:
73-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
7466

7567
- name: Set up Node.js 22
7668
uses: actions/setup-node@v4
@@ -90,8 +82,6 @@ jobs:
9082
python: ["3.9"]
9183
steps:
9284
- uses: actions/checkout@v4
93-
with:
94-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
9585
- name: Set up Python
9686
uses: actions/setup-python@v5
9787
with:
@@ -108,8 +98,6 @@ jobs:
10898
steps:
10999
- name: Check out code
110100
uses: actions/checkout@v4
111-
with:
112-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
113101

114102
- name: Set up Node.js 22
115103
uses: actions/setup-node@v4
@@ -129,8 +117,6 @@ jobs:
129117
python: ["3.9", "3.13"]
130118
steps:
131119
- uses: actions/checkout@v4
132-
with:
133-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
134120
- name: Set up Python
135121
uses: actions/setup-python@v5
136122
with:
@@ -147,8 +133,6 @@ jobs:
147133
steps:
148134
- name: Check out code
149135
uses: actions/checkout@v4
150-
with:
151-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
152136

153137
- name: Set up Node.js 22
154138
uses: actions/setup-node@v4
@@ -168,8 +152,6 @@ jobs:
168152
python: ["3.9", "3.13"]
169153
steps:
170154
- uses: actions/checkout@v4
171-
with:
172-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
173155
- name: Set up Python
174156
uses: actions/setup-python@v5
175157
with:
@@ -186,8 +168,6 @@ jobs:
186168
steps:
187169
- name: Check out code
188170
uses: actions/checkout@v4
189-
with:
190-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
191171

192172
- name: Set up Node.js 22
193173
uses: actions/setup-node@v4
@@ -201,6 +181,8 @@ jobs:
201181
run: npm run test:integration
202182

203183
build:
184+
# Only build if the PR branch is local
185+
if: github.event.pull_request.head.repo.full_name == github.repository
204186
runs-on: ubuntu-latest
205187
strategy:
206188
matrix:
@@ -210,7 +192,6 @@ jobs:
210192
uses: actions/checkout@v4
211193
with:
212194
fetch-depth: 0
213-
ref: "${{ github.event.pull_request.merge_commit_sha }}"
214195
- name: Set up Python
215196
uses: actions/setup-python@v5
216197
with:
@@ -357,6 +338,8 @@ jobs:
357338
run: echo "Skipping UI preview build - no relevant files changed"
358339

359340
build-and-push-container:
341+
# Only build if the PR branch is local
342+
if: github.event.pull_request.head.repo.full_name == github.repository
360343
runs-on: ubuntu-latest
361344
permissions:
362345
packages: write

0 commit comments

Comments
 (0)