@@ -269,7 +269,7 @@ jobs:
269269 run : yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
270270
271271 - 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' }}
273273 run : yarn cli cts run javascript ${{ fromJSON(needs.setup.outputs.JAVASCRIPT_DATA).toRun }} --no-client --no-requests
274274
275275 - name : Run benchmarks
@@ -383,7 +383,7 @@ jobs:
383383 run : yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
384384
385385 - 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' }}
387387 run : yarn cli cts run ${{ matrix.client.language }} ${{ matrix.client.toRun }} --no-client --no-requests
388388
389389 - name : Run benchmarks
@@ -479,23 +479,27 @@ jobs:
479479 name : client swift${{ needs.setup.outputs.RUN_MACOS_SWIFT_CTS == 'true' && format('@{0}', fromJSON(needs.setup.outputs.SWIFT_DATA).version) || '' }} macos
480480 steps :
481481 - uses : actions/checkout@v4
482+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
482483
483484 - name : Download artifacts
484485 uses : ./scripts/ci/actions/restore-artifacts
486+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
485487 with :
486488 type : languages
487489 languages : |
488490 swift
489491
490492 - name : Setup
491493 uses : ./.github/actions/setup
494+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
492495 with :
493496 type : minimal
494497 language : swift
495498 version : ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }}
496499
497500 - name : Run tests on macOS
498501 id : run-test
502+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
499503 continue-on-error : true
500504 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' || '' }}
501505
@@ -528,7 +532,7 @@ jobs:
528532 with :
529533 fetch-depth : 0
530534 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 }}
532536 repository : ${{ github.event.pull_request.head.repo.full_name }}
533537
534538 - name : Download all artifacts
@@ -572,14 +576,14 @@ jobs:
572576 id : pushGeneratedCode
573577 run : yarn workspace scripts pushGeneratedCode
574578 env :
575- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
579+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
576580 PR_NUMBER : ${{ github.event.number }}
577581
578582 - name : update generation comment
579583 uses : marocchino/sticky-pull-request-comment@v2
580584 if : ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT == '' }}
581585 with :
582- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
586+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
583587 message : |
584588 ### No code generated
585589
@@ -591,7 +595,7 @@ jobs:
591595 uses : marocchino/sticky-pull-request-comment@v2
592596 if : ${{ steps.pushGeneratedCode.outputs.GENERATED_COMMIT != '' }}
593597 with :
594- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
598+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
595599 message : |
596600 ### ✔️ Code generated!
597601
0 commit comments