CI: print the job container's mounts while wiring up the test step

This commit is contained in:
2026-07-23 12:14:46 -05:00
parent 73e4b7fbef
commit 27ebf38502
+6 -1
View File
@@ -25,8 +25,13 @@ jobs:
- name: Test - name: Test
run: | run: |
set -euo pipefail set -euo pipefail
echo "--- hostname: $(hostname)"
echo "--- GITHUB_WORKSPACE: ${GITHUB_WORKSPACE:-unset}"
echo "--- pwd: $(pwd)"
echo "--- mounts of this job container:"
docker inspect "$(hostname)" --format '{{json .Mounts}}' || echo " cannot inspect self"
VOL=$(docker inspect "$(hostname)" \ VOL=$(docker inspect "$(hostname)" \
--format '{{range .Mounts}}{{if eq .Destination "/workspace"}}{{.Name}}{{end}}{{end}}') --format '{{range .Mounts}}{{if eq .Destination "/workspace"}}{{.Name}}{{end}}{{end}}' 2>/dev/null || true)
if [ -z "$VOL" ]; then if [ -z "$VOL" ]; then
echo "could not find this job's workspace volume — refusing to skip the tests" >&2 echo "could not find this job's workspace volume — refusing to skip the tests" >&2
exit 1 exit 1