Skip to content

Commit c62f78a

Browse files
committed
Skip badge update when no smoke-status artifacts are present
Before iterating over smoke-status/*/*, check with compgen whether any status files were downloaded; if none exist (e.g., when matrix jobs were skipped or failed early), log a message and exit the badge update step successfully instead of erroring with 'cat: ... No such file or directory'.
1 parent 87b88a1 commit c62f78a

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

.github/workflows/basic-smoke-test.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,12 @@ jobs:
8484
macos="unknown"
8585
windows="unknown"
8686
87+
# If no smoke-status artifacts were downloaded, skip badge update.
88+
if ! compgen -G "smoke-status/*/*" > /dev/null; then
89+
echo "No smoke-status artifacts found; skipping badge update."
90+
exit 0
91+
fi
92+
8793
# Each artifact directory contains a single smoke-status.txt file.
8894
for f in smoke-status/*/*; do
8995
line=$(cat "$f")

0 commit comments

Comments
 (0)