Skip to content

Commit

Permalink
Ignore empty Gradle build scans and continute to upload
Browse files Browse the repository at this point in the history
  • Loading branch information
ikhoon committed Aug 19, 2023
1 parent 1ce4c69 commit 3346311
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions .github/workflows/gradle-build-scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,14 @@ jobs:
JOB_NAME=$(echo ${SCAN} | sed 's/.*build-scan-\(.*\)/\1/')
echo "📤 Uploading build scan for job ${JOB_NAME} ..."
./gradlew --no-daemon --stacktrace clean buildScanPublishPrevious
echo "✅ Published build scan: ${JOB_NAME}"
BUILD_SCANS="${JOB_NAME} $(cat build/build-scan-url.txt),${BUILD_SCANS}"
echo "- [${JOB_NAME}]($(cat build/build-scan-url.txt))" >> "$GITHUB_STEP_SUMMARY"
if ./gradlew --no-daemon --stacktrace clean buildScanPublishPrevious; then
echo "✅ Published build scan: ${JOB_NAME}"
BUILD_SCANS="${JOB_NAME} $(cat build/build-scan-url.txt),${BUILD_SCANS}"
echo "- [${JOB_NAME}]($(cat build/build-scan-url.txt))" >> "$GITHUB_STEP_SUMMARY"
else
echo "❌ Failed to upload build scan: ${JOB_NAME}"
fi
rm -rf $BUILD_SCAN_DIR
done
Expand Down

0 comments on commit 3346311

Please sign in to comment.