Compare commits

...

4 Commits

Author SHA1 Message Date
Richard Holland
90cacbcb46 Merge branch 'dev' into fix-docker-cleanup-empty-path 2026-09-29 05:40:22 +10:00
Richard Holland
9cd9307dab Merge branch 'dev' into fix-docker-cleanup-empty-path 2026-09-29 05:35:50 +10:00
Nicholas Dudfield
086ffa5471 fix(ci): guard docker cleanup with one explicit empty-path check
Replace the job-level condition and the ${CHECKOUT_PATH:?} expansion with a
single shell if: an empty path logs why nothing was cleaned and exits 0.
2026-09-28 13:59:51 +07:00
Nicholas Dudfield
55b418d224 fix(ci): skip docker cleanup when the run has no checkout path
A run cancelled before its checkout job started never sets checkout_path,
but cleanup runs under always(), so its rm -rf targeted the workspace root
and deleted every in-flight run's checkout on the shared runner. Skip
cleanup without a path, and make the shell refuse an empty one.

Fixes #838
2026-09-28 13:17:02 +07:00

View File

@@ -91,5 +91,11 @@ jobs:
- name: Cleanup workspace
run: |
CHECKOUT_PATH="${{ needs.checkout.outputs.checkout_path }}"
# A run cancelled before checkout has no path; an empty one would
# make the rm below delete every run's checkout on the runner.
if [[ -z "${CHECKOUT_PATH}" ]]; then
echo "No checkout path (cancelled before checkout); nothing to clean"
exit 0
fi
echo "Cleaning workspace for ${CHECKOUT_PATH}"
rm -rf "${{ github.workspace }}/${CHECKOUT_PATH}"