mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2026-03-01 00:39:54 +01:00
fix(optimize-images): fix git implementation of pr diff (#57)
This commit is contained in:
parent
be9f21cb0d
commit
2c8beeed8f
3
.github/workflows/optimize-images.yml
vendored
3
.github/workflows/optimize-images.yml
vendored
@ -25,8 +25,9 @@ jobs:
|
||||
echo 'png_files<<EOF'
|
||||
if [ "${{ github.event_name }}" = pull_request ] &&
|
||||
[ "${{ !github.event.pull_request.draft }}" = true ]; then
|
||||
git fetch origin "$GITHUB_BASE_REF" &&
|
||||
git fetch origin "$GITHUB_BASE_REF" "refs/pull/$PR_NUMBER/head:pr-$PR_NUMBER" &&
|
||||
git diff --name-only -l10000 "origin/$GITHUB_BASE_REF" "pr-$PR_NUMBER" -- '*.png'
|
||||
git diff --name-only --diff-filter=AM --no-renames "origin/$GITHUB_BASE_REF" "pr-$PR_NUMBER" -- '*.png'
|
||||
else
|
||||
find "$GITHUB_WORKSPACE" -type f -name "*.png" ! -path "$GITHUB_WORKSPACE/.git/*" -print 2>/dev/null
|
||||
fi
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user