@@ -21,15 +21,15 @@ jobs:
21
21
notification :
22
22
runs-on : ubuntu-22.04
23
23
timeout-minutes : 1
24
- if : ${{ github.event.number }}
24
+ if : ${{ !github.event.pull_request.head.repo.fork && github.event.number }}
25
25
permissions :
26
26
pull-requests : write
27
27
steps :
28
28
- uses : actions/checkout@v4
29
29
30
30
- uses : marocchino/sticky-pull-request-comment@v2
31
31
with :
32
- GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
32
+ GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN }}
33
33
message : |
34
34
### 🪓 The generated code will be pushed at the end of the CI.
35
35
@@ -265,7 +265,7 @@ jobs:
265
265
- name : Run e2e CTS
266
266
id : cts-e2e
267
267
continue-on-error : true
268
- if : ${{ env.ALGOLIA_APPLICATION_ID != '' && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
268
+ if : ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
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
@@ -379,7 +379,7 @@ jobs:
379
379
- name : Run e2e CTS
380
380
id : cts-e2e
381
381
continue-on-error : true
382
- if : ${{ env.ALGOLIA_APPLICATION_ID != '' && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
382
+ if : ${{ !github.event.pull_request.head.repo.fork && !contains(format('{0} {1}', github.event.pull_request.title, github.event.head_commit.message), '[skip-e2e]') }}
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
@@ -482,24 +482,24 @@ jobs:
482
482
if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
483
483
484
484
- name : Download artifacts
485
- if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
486
485
uses : ./scripts/ci/actions/restore-artifacts
486
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
487
487
with :
488
488
type : languages
489
489
languages : |
490
490
swift
491
491
492
492
- name : Setup
493
- if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
494
493
uses : ./.github/actions/setup
494
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
495
495
with :
496
496
type : minimal
497
497
language : swift
498
498
version : ${{ fromJSON(needs.setup.outputs.SWIFT_DATA).version }}
499
499
500
500
- name : Run tests on macOS
501
- if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
502
501
id : run-test
502
+ if : ${{ env.ALGOLIA_APPLICATION_ID != '' }}
503
503
continue-on-error : true
504
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' || '' }}
505
505
@@ -533,6 +533,7 @@ jobs:
533
533
fetch-depth : 0
534
534
ref : ${{ github.event.pull_request.head.ref }}
535
535
token : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
536
+ repository : ${{ github.event.pull_request.head.repo.full_name }}
536
537
537
538
- name : Download all artifacts
538
539
uses : ./scripts/ci/actions/restore-artifacts
@@ -571,17 +572,12 @@ jobs:
571
572
} >> "$GITHUB_OUTPUT"
572
573
rm -rf tests/output/**/benchmarkResult.json
573
574
574
- - name : Extract branch name
575
- id : extract_branch
576
- run : echo "branch=${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}" >> $GITHUB_OUTPUT
577
-
578
575
- name : Push generated code
579
576
id : pushGeneratedCode
580
577
run : yarn workspace scripts pushGeneratedCode
581
578
env :
582
579
GITHUB_TOKEN : ${{ secrets.ALGOLIA_BOT_TOKEN != '' && secrets.ALGOLIA_BOT_TOKEN || secrets.GITHUB_TOKEN }}
583
580
PR_NUMBER : ${{ github.event.number }}
584
- BRANCH_NAME : ${{ steps.extract_branch.outputs.branch }}
585
581
586
582
- name : update generation comment
587
583
uses : marocchino/sticky-pull-request-comment@v2
0 commit comments