Skip to content

Commit 17c3e9e

Browse files
authored
chore: update test to include pull request head sha checkout (#1205)
1 parent c9dcbc3 commit 17c3e9e

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

.github/workflows/test.yml

+27
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,33 @@ jobs:
316316
shell:
317317
bash
318318

319+
test-pull-request-head-ref:
320+
name: Test changed-files with pull request head ref
321+
runs-on: ubuntu-latest
322+
needs: build
323+
if: github.event_name != 'push'
324+
325+
steps:
326+
- name: Checkout to branch
327+
uses: actions/checkout@v3
328+
with:
329+
ref: ${{ github.event.pull_request.head.sha }}
330+
331+
- name: Download build assets
332+
uses: actions/download-artifact@v3
333+
with:
334+
name: build-assets
335+
336+
- name: Run changed-files
337+
id: changed-files
338+
uses: ./
339+
340+
- name: Show output
341+
run: |
342+
echo '${{ toJSON(steps.changed-files.outputs) }}'
343+
shell:
344+
bash
345+
319346
test-non-existent-base-sha:
320347
name: Test changed-files non existent base sha
321348
runs-on: ubuntu-latest

0 commit comments

Comments
 (0)