From 71e7ef3071f6886f42e2847657f3a315444d212b Mon Sep 17 00:00:00 2001 From: davdhacs <105243888+davdhacs@users.noreply.github.com> Date: Thu, 12 Mar 2026 11:18:35 -0600 Subject: [PATCH] ci: add background disk usage monitor to job-preamble Adds a background df poll (every 30s) that logs available disk space to /dev/shm (RAM-backed tmpfs, survives disk full). The existing record_job_info post-step kills the monitor and dumps the log. Uses a plain subshell & in a regular step (no gacts/run-and-post-run needed since regular composite action steps don't wait for background children). Co-Authored-By: Claude Opus 4.6 (1M context) --- .github/actions/job-preamble/action.yaml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/.github/actions/job-preamble/action.yaml b/.github/actions/job-preamble/action.yaml index 099de277da465..b0d03f77cb14d 100644 --- a/.github/actions/job-preamble/action.yaml +++ b/.github/actions/job-preamble/action.yaml @@ -139,6 +139,13 @@ runs: git config --global --add safe.directory "$(pwd)" shell: bash + - name: Monitor disk usage + shell: bash + run: | + (while sleep 30; do echo "$(date -u +%H:%M:%S) $(df -BGB --output=avail / | tail -1)"; done) \ + >> /dev/shm/disk-monitor.log 2>&1 & + echo $! > /dev/shm/disk-monitor.pid + - name: Record job info uses: gacts/run-and-post-run@d803f6920adc9a47eeac4cb6c93dbc2e2890c684 # v1.4.0 id: record_job_info @@ -165,3 +172,5 @@ runs: du -k / 2>/dev/null | sort -V | tail -100 || true; \ printf "Low free disk space post-job: ${free}" | tee -a "$GITHUB_STEP_SUMMARY";\ fi; + cat /dev/shm/disk-monitor.log; + kill $(