Skip to content

Commit 40ce259

Browse files
committed
fix: zip qs testing workflows
1 parent 9569aa4 commit 40ce259

File tree

1 file changed

+27
-22
lines changed

1 file changed

+27
-22
lines changed

.github/workflows/zip.yml

Lines changed: 27 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,11 @@ permissions:
66
actions: read
77
contents: read
88

9+
env:
10+
# When a run_id is specified, build jobs will be skipped and the specified
11+
# run's artifacts will be used for testing.
12+
PINNED_RUN_ID: '17965877651'
13+
914
on:
1015
pull_request:
1116
paths:
@@ -44,7 +49,7 @@ jobs:
4449
if: |
4550
github.repository == 'firebase/firebase-ios-sdk' &&
4651
contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) &&
47-
github.event.inputs.zip_run_id == ''
52+
github.event.inputs.zip_run_id == '' && github.env.PINNED_RUN_ID == ''
4853
runs-on: macos-14
4954
steps:
5055
- uses: actions/checkout@v4
@@ -75,7 +80,7 @@ jobs:
7580
if: |
7681
github.repository == 'firebase/firebase-ios-sdk' &&
7782
contains(fromJSON('["schedule", "pull_request", "workflow_dispatch"]'), github.event_name) &&
78-
github.event.inputs.zip_run_id == ''
83+
github.event.inputs.zip_run_id == '' && github.env.PINNED_RUN_ID == ''
7984
runs-on: macos-14
8085
steps:
8186
- uses: actions/checkout@v4
@@ -119,7 +124,7 @@ jobs:
119124

120125
quickstart_framework_abtesting:
121126
needs: package-head
122-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
127+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
123128
env:
124129
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
125130
SDK: "ABTesting"
@@ -136,7 +141,7 @@ jobs:
136141
uses: actions/[email protected]
137142
with:
138143
name: ${{ matrix.artifact }}
139-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
144+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
140145
github-token: ${{ secrets.GITHUB_TOKEN }}
141146
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
142147
- name: Xcode
@@ -172,7 +177,7 @@ jobs:
172177

173178
quickstart_framework_auth:
174179
needs: package-head
175-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
180+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
176181
env:
177182
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
178183
SDK: "Authentication"
@@ -190,7 +195,7 @@ jobs:
190195
uses: actions/[email protected]
191196
with:
192197
name: ${{ matrix.artifact }}
193-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
198+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
194199
github-token: ${{ secrets.GITHUB_TOKEN }}
195200
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
196201
- name: Xcode
@@ -223,7 +228,7 @@ jobs:
223228

224229
quickstart_framework_config:
225230
needs: package-head
226-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
231+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
227232
env:
228233
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
229234
SDK: "Config"
@@ -240,7 +245,7 @@ jobs:
240245
uses: actions/[email protected]
241246
with:
242247
name: ${{ matrix.artifact }}
243-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
248+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
244249
github-token: ${{ secrets.GITHUB_TOKEN }}
245250
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
246251
- name: Xcode
@@ -272,7 +277,7 @@ jobs:
272277

273278
quickstart_framework_crashlytics:
274279
needs: package-head
275-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
280+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
276281
env:
277282
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
278283
SDK: "Crashlytics"
@@ -289,7 +294,7 @@ jobs:
289294
uses: actions/[email protected]
290295
with:
291296
name: ${{ matrix.artifact }}
292-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
297+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
293298
github-token: ${{ secrets.GITHUB_TOKEN }}
294299
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
295300
- name: Xcode
@@ -338,7 +343,7 @@ jobs:
338343

339344
quickstart_framework_database:
340345
needs: package-head
341-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
346+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
342347
env:
343348
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
344349
SDK: "Database"
@@ -354,7 +359,7 @@ jobs:
354359
uses: actions/[email protected]
355360
with:
356361
name: ${{ matrix.artifact }}
357-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
362+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
358363
github-token: ${{ secrets.GITHUB_TOKEN }}
359364
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
360365
- name: Xcode
@@ -390,7 +395,7 @@ jobs:
390395

391396
quickstart_framework_firestore:
392397
needs: package-head
393-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
398+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
394399
env:
395400
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
396401
SDK: "Firestore"
@@ -407,7 +412,7 @@ jobs:
407412
uses: actions/[email protected]
408413
with:
409414
name: ${{ matrix.artifact }}
410-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
415+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
411416
github-token: ${{ secrets.GITHUB_TOKEN }}
412417
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
413418
- name: Xcode
@@ -447,7 +452,7 @@ jobs:
447452

448453
check_framework_firestore_symbols:
449454
needs: package-head
450-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
455+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
451456
env:
452457
FIREBASECI_USE_LATEST_GOOGLEAPPMEASUREMENT: 1
453458
runs-on: macos-14
@@ -459,7 +464,7 @@ jobs:
459464
uses: actions/[email protected]
460465
with:
461466
name: Firebase-actions-dir
462-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
467+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
463468
github-token: ${{ secrets.GITHUB_TOKEN }}
464469
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
465470
- name: Setup Bundler
@@ -479,7 +484,7 @@ jobs:
479484
480485
quickstart_framework_inappmessaging:
481486
needs: package-head
482-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
487+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
483488
env:
484489
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
485490
SDK: "InAppMessaging"
@@ -496,7 +501,7 @@ jobs:
496501
uses: actions/[email protected]
497502
with:
498503
name: ${{ matrix.artifact }}
499-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
504+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
500505
github-token: ${{ secrets.GITHUB_TOKEN }}
501506
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
502507
- name: Xcode
@@ -532,7 +537,7 @@ jobs:
532537

533538
quickstart_framework_messaging:
534539
needs: package-head
535-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
540+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
536541
env:
537542
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
538543
SDK: "Messaging"
@@ -549,7 +554,7 @@ jobs:
549554
uses: actions/[email protected]
550555
with:
551556
name: ${{ matrix.artifact }}
552-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
557+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
553558
github-token: ${{ secrets.GITHUB_TOKEN }}
554559
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
555560
- name: Xcode
@@ -585,7 +590,7 @@ jobs:
585590

586591
quickstart_framework_storage:
587592
needs: package-head
588-
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '') }}
593+
if: ${{ !cancelled() && (success() || github.event.inputs.zip_run_id != '' || github.env.PINNED_RUN_ID != '') }}
589594
env:
590595
plist_secret: ${{ secrets.GHASecretsGPGPassphrase1 }}
591596
SDK: "Storage"
@@ -602,7 +607,7 @@ jobs:
602607
uses: actions/[email protected]
603608
with:
604609
name: ${{ matrix.artifact }}
605-
run-id: ${{ github.event.inputs.zip_run_id || github.run_id }}
610+
run-id: ${{ github.event.inputs.zip_run_id || github.env.PINNED_RUN_ID != '' || github.run_id }}
606611
github-token: ${{ secrets.GITHUB_TOKEN }}
607612
- uses: ruby/setup-ruby@354a1ad156761f5ee2b7b13fa8e09943a5e8d252 # v1
608613
- name: Xcode

0 commit comments

Comments
 (0)