@@ -269,7 +269,7 @@ jobs:
269
269
run : yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
270
270
271
271
- name : Retry e2e CTS
272
- if : ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
272
+ if : ${{ steps.cts-e2e.outcome == 'failure' }}
273
273
run : yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
274
274
275
275
- name : Run benchmarks
@@ -383,7 +383,7 @@ jobs:
383
383
run : yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
384
384
385
385
- name : Retry e2e CTS
386
- if : ${{ !github.event.pull_request.head.repo.fork && steps.cts-e2e.outcome == 'failure' }}
386
+ if : ${{ steps.cts-e2e.outcome == 'failure' }}
387
387
run : yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
388
388
389
389
- name : Run benchmarks
@@ -479,23 +479,27 @@ jobs:
479
479
name : client swift${{ needs.setup.outputs.RUN_MACOS_SWIFT_CTS == 'true' && format('@{0}', fromJSON(needs.setup.outputs.SWIFT_DATA).version) || '' }} macos
480
480
steps :
481
481
- uses : actions/checkout@v4
482
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
482
483
483
484
- name : Download artifacts
484
485
uses : ./scripts/ci/actions/restore-artifacts
486
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
485
487
with :
486
488
type : languages
487
489
languages : |
488
490
swift
489
491
490
492
- name : Setup
491
493
uses : ./.github/actions/setup
494
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
492
495
with :
493
496
type : minimal
494
497
language : swift
495
498
version : ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }}
496
499
497
500
- name : Run tests on macOS
498
501
id : run-test
502
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
499
503
continue-on-error : true
500
504
run : yarn cli cts run swift ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).toRun }} -v ${{ !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') && '--no-e2e' || '' }}
501
505
@@ -528,7 +532,7 @@ jobs:
528
532
with :
529
533
fetch-depth : 0
530
534
ref : ${{ github.event.pull_request.head.ref }}
531
- token : ${{ secrets.ALGOLIA_BOT_TOKEN }}
535
+ token : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
532
536
repository : ${{ github.event.pull_request.head.repo.full_name }}
533
537
534
538
- name : Download all artifacts
@@ -572,14 +576,14 @@ jobs:
572
576
id : pushGeneratedCode
573
577
run : yarn workspace scripts pushGeneratedCode
574
578
env :
575
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
579
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
576
580
PR_NUMBER : ${{ github.event.number }}
577
581
578
582
- name : update generation comment
579
583
uses : marocchino/sticky-pull-request-comment@v2
580
584
if : ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT == '' }}
581
585
with :
582
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
586
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
583
587
message : |
584
588
### No code generated
585
589
@@ -591,7 +595,7 @@ jobs:
591
595
uses : marocchino/sticky-pull-request-comment@v2
592
596
if : ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT != '' }}
593
597
with :
594
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
598
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
595
599
message : |
596
600
### ✔️ Code generated!
597
601
0 commit comments