There was an error while loading. Please reload this page.
2 parents 86da521 + 047edca commit 484e8b9Copy full SHA for 484e8b9
1 file changed
.github/workflows/upload-images.yml
@@ -17,10 +17,19 @@ jobs:
17
- name: Checkout repository
18
uses: actions/checkout@v4
19
20
- - name: Get changed image files
+ - name: Get newly added image files from PR
21
id: changed
22
run: |
23
- FILES=$(git diff --name-only ${{ github.event.before }} ${{ github.sha }} | grep -E '\.(png|jpg|jpeg|webp)$' || true)
+ 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
33
echo "files<<EOF" >> $GITHUB_OUTPUT
34
echo "$FILES" >> $GITHUB_OUTPUT
35
echo "EOF" >> $GITHUB_OUTPUT
0 commit comments