Skip to content

Commit 29d9ae5

Browse files
committed
Adjust ci workflow
1 parent d423397 commit 29d9ae5

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

.github/workflows/fetch-wxr-assets.yml

+9-3
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,15 @@ jobs:
1414
uses: webfactory/[email protected]
1515
with:
1616
ssh-private-key: ${{ secrets.GH_DEPLOY_KEY }}
17-
- name: Checkout
17+
- name: Checkout the PR branch
1818
uses: actions/checkout@v3
19-
19+
with:
20+
ref: ${{ github.head_ref }}
21+
- name: Checkout the base branch
22+
uses: actions/checkout@v3
23+
with:
24+
ref: ${{ github.event.pull_request.base.ref }}
25+
path: base
2026
- name: Set up PHP
2127
uses: shivammathur/setup-php@v2
2228
with:
@@ -30,7 +36,7 @@ jobs:
3036
- name: Find WXR and XML files added in PR
3137
id: find_files
3238
run: |
33-
FILES=$(git diff --diff-filter=A --name-only ${{ github.event.pull_request.base.sha }} ${{ github.sha }} | grep -E '\.(wxr|xml)$')
39+
FILES=$(git diff --diff-filter=A --name-only HEAD base/${{ github.event.pull_request.base.ref }} | grep -E '\.(wxr|xml)$')
3440
if [ -z "$FILES" ]; then
3541
echo "No newly added WXR or XML files to check."
3642
exit 0

0 commit comments

Comments
 (0)