Skip to content

Commit ae3d63c

Browse files
committed
fix checkout
1 parent 21acb7e commit ae3d63c

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

965965
steps:
966+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
967+
uses: actions/checkout@v4
968+
if: github.event_name == 'pull_request'
969+
with:
970+
ref: ${{ github.event.pull_request.base.sha }}
971+
966972
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
967973
uses: actions/checkout@v4
968974
with:
@@ -984,8 +990,8 @@ jobs:
984990

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

991997
- name: Restore tarball cache
@@ -1144,6 +1150,11 @@ jobs:
11441150
label: 'nextjs-turbo (latest)'
11451151

11461152
steps:
1153+
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
1154+
uses: actions/checkout@v4
1155+
if: github.event_name == 'pull_request'
1156+
with:
1157+
ref: ${{ github.event.pull_request.base.sha }}
11471158
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})
11481159
uses: actions/checkout@v4
11491160
with:
@@ -1162,8 +1173,8 @@ jobs:
11621173

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

11691180
- name: Restore tarball cache

0 commit comments

Comments
 (0)