Skip to content

Commit 484e8b9

Browse files
authored
Merge pull request #9 from Gallegarmy/fix-pipeline
fix: fix pipeline
2 parents 86da521 + 047edca commit 484e8b9

1 file changed

Lines changed: 11 additions & 2 deletions

File tree

.github/workflows/upload-images.yml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,19 @@ jobs:
1717
- name: Checkout repository
1818
uses: actions/checkout@v4
1919

20-
- name: Get changed image files
20+
- name: Get newly added image files from PR
2121
id: changed
2222
run: |
23-
FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(png|jpg|jpeg|webp)$' || true)
23+
git fetch origin ${{ github.event.pull_request.base.ref }}
24+
25+
FILES=$(git diff --name-status origin/${{ github.event.pull_request.base.ref }} ${{ github.sha }} \
26+
| grep '^A' \
27+
| awk '{print $2}' \
28+
| grep -Ei '\.(png|jpg|jpeg|webp)$' || true)
29+
30+
echo "FILES FOUND:"
31+
echo "$FILES"
32+
2433
echo "files<<EOF" >> $GITHUB_OUTPUT
2534
echo "$FILES" >> $GITHUB_OUTPUT
2635
echo "EOF" >> $GITHUB_OUTPUT

0 commit comments

Comments
 (0)