Skip to content

Commit 327c08a

Browse files
committed
fix checkout
1 parent 887f013 commit 327c08a

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
@@ -964,6 +964,12 @@ jobs:
964964
label: 'nextjs-app-dir (next@13)'
965965

966966
steps:
967+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
968+
uses: actions/checkout@v4
969+
if: github.event_name == 'pull_request'
970+
with:
971+
ref: ${{ github.event.pull_request.base.sha }}
972+
967973
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
968974
uses: actions/checkout@v4
969975
with:
@@ -985,8 +991,8 @@ jobs:
985991

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

992998
- name: Restore tarball cache
@@ -1145,6 +1151,11 @@ jobs:
11451151
label: 'nextjs-turbo (latest)'
11461152

11471153
steps:
1154+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
1155+
uses: actions/checkout@v4
1156+
if: github.event_name == 'pull_request'
1157+
with:
1158+
ref: ${{ github.event.pull_request.base.sha }}
11481159
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
11491160
uses: actions/checkout@v4
11501161
with:
@@ -1163,8 +1174,8 @@ jobs:
11631174

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

11701181
- name: Restore tarball cache

0 commit comments

Comments
 (0)