fix(ci): Process only needed files in publish sizes (#11439)
This commit is contained in:
parent
ee347baa7d
commit
af47bd3008
1 changed files with 10 additions and 9 deletions
19
.github/workflows/publishsizes.yml
vendored
19
.github/workflows/publishsizes.yml
vendored
|
|
@ -44,16 +44,17 @@ jobs:
|
||||||
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
|
gh api "$artifacts_url" -q '.artifacts[] | [.name, .archive_download_url] | @tsv' | while read artifact
|
||||||
do
|
do
|
||||||
IFS=$'\t' read name url <<< "$artifact"
|
IFS=$'\t' read name url <<< "$artifact"
|
||||||
gh api $url > "$name.zip"
|
# Only process pr_number and pr_cli_compile artifacts
|
||||||
unzip -j "$name.zip" -d "temp_$name"
|
if [[ "$name" == "pr_number" || "$name" =~ ^pr_cli_compile_[0-9]+$ ]]; then
|
||||||
if [[ "$name" == "pr_number" ]]; then
|
gh api $url > "$name.zip"
|
||||||
mv "temp_$name"/* sizes-report
|
unzip -o -j "$name.zip" -d "temp_$name"
|
||||||
elif [[ "$name" == "pr_cli"* ]]; then
|
if [[ "$name" == "pr_number" ]]; then
|
||||||
mv "temp_$name"/* sizes-report/pr
|
mv "temp_$name"/* sizes-report
|
||||||
else
|
elif [[ "$name" =~ ^pr_cli_compile_[0-9]+$ ]]; then
|
||||||
mv "temp_$name"/* sizes-report
|
mv "temp_$name"/* sizes-report/pr
|
||||||
|
fi
|
||||||
|
rm -r "temp_$name"
|
||||||
fi
|
fi
|
||||||
rm -r "temp_$name"
|
|
||||||
done
|
done
|
||||||
echo "Contents of parent directory:"
|
echo "Contents of parent directory:"
|
||||||
ls -R ..
|
ls -R ..
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue