Handle missing benchmark artifact by creating an HTML placeholder instead of failing the workflow

This commit is contained in:
Palash Tyagi 2025-06-07 13:17:06 +01:00
parent 9279939c30
commit 7b33b5b582

View File

@ -112,14 +112,14 @@ jobs:
if [ -z "$artifact_url" ]; then if [ -z "$artifact_url" ]; then
echo "No benchmark artifact found!" echo "No benchmark artifact found!"
exit 1 mkdir -p benchmark-report
echo '<!DOCTYPE html><html><head><title>No Benchmarks</title></head><body><h1>No benchmarks available</h1></body></html>' > benchmark-report/index.html
exit 0
fi fi
curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" \ curl -L -H "Authorization: Bearer ${{ secrets.CUSTOM_GH_TOKEN }}" \
"$artifact_url" -o benchmark-report.zip "$artifact_url" -o benchmark-report.zip
# Print all files in the current directory # Print all files in the current directory
echo "Files in the current directory:" echo "Files in the current directory:"
ls -al ls -al