Skip to content

Commit 80e2026

Browse files
committed
fix checkout
1 parent db5cb06 commit 80e2026

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -965,6 +965,12 @@ jobs:
965965
label: 'nextjs-app-dir (next@13)'
966966

967967
steps:
968+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
969+
uses: actions/checkout@v4
970+
if: github.event_name == 'pull_request'
971+
with:
972+
ref: ${{ github.event.pull_request.base.sha }}
973+
968974
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
969975
uses: actions/checkout@v4
970976
with:
@@ -986,8 +992,8 @@ jobs:
986992

987993
- name: Determine if test app should be run
988994
id: should-skip
989-
if: github.event.pull_request.base.sha
990-
run: yarn test:should-skip ${{ matrix.test-application }} --base=${{ github.event.pull_request.base.sha }} >> $GITHUB_OUTPUT
995+
if: github.event_name == 'pull_request'
996+
run: yarn --silent test:should-skip ${{ matrix.test-application }} --base=${{ github.event.pull_request.base.sha }} >> $GITHUB_OUTPUT
991997
working-directory: dev-packages/e2e-tests
992998

993999
- name: Restore tarball cache
@@ -1146,6 +1152,11 @@ jobs:
11461152
label: 'nextjs-turbo (latest)'
11471153

11481154
steps:
1155+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
1156+
uses: actions/checkout@v4
1157+
if: github.event_name == 'pull_request'
1158+
with:
1159+
ref: ${{ github.event.pull_request.base.sha }}
11491160
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
11501161
uses: actions/checkout@v4
11511162
with:
@@ -1164,8 +1175,8 @@ jobs:
11641175

11651176
- name: Determine if test app should be run
11661177
id: should-skip
1167-
if: github.event.pull_request.base.sha
1168-
run: yarn test:should-skip ${{ matrix.test-application }} --base=${{ github.event.pull_request.base.sha }} >> $GITHUB_OUTPUT
1178+
if: github.event_name == 'pull_request'
1179+
run: yarn --silent test:should-skip ${{ matrix.test-application }} --base=${{ github.event.pull_request.base.sha }} >> $GITHUB_OUTPUT
11691180
working-directory: dev-packages/e2e-tests
11701181

11711182
- name: Restore tarball cache

0 commit comments

Comments
 (0)