mirror of
https://github.com/GTNewHorizons/GTNH-Actions-Workflows.git
synced 2026-03-01 00:39:54 +01:00
Remove risks of rate limitation on large PRs (#56)
This commit is contained in:
parent
a7dcf25ecb
commit
be9f21cb0d
3
.github/workflows/optimize-images.yml
vendored
3
.github/workflows/optimize-images.yml
vendored
@ -25,7 +25,8 @@ jobs:
|
|||||||
echo 'png_files<<EOF'
|
echo 'png_files<<EOF'
|
||||||
if [ "${{ github.event_name }}" = pull_request ] &&
|
if [ "${{ github.event_name }}" = pull_request ] &&
|
||||||
[ "${{ !github.event.pull_request.draft }}" = true ]; then
|
[ "${{ !github.event.pull_request.draft }}" = true ]; then
|
||||||
gh pr diff "$PR_NUMBER" --name-only | grep '*.png'
|
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'
|
||||||
else
|
else
|
||||||
find "$GITHUB_WORKSPACE" -type f -name "*.png" ! -path "$GITHUB_WORKSPACE/.git/*" -print 2>/dev/null
|
find "$GITHUB_WORKSPACE" -type f -name "*.png" ! -path "$GITHUB_WORKSPACE/.git/*" -print 2>/dev/null
|
||||||
fi
|
fi
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user