♻️ Assert the baked tool cache instead of logging it
The diagnostics did their job (missing <version>/<arch>.complete marker, now written by the image). Replace the noise with a fail-fast assert that names the same invariant, mirroring the publish job's NPM_TOKEN check: a stale tag on the runner would otherwise silently reintroduce the per-job download, with nothing in the repo to catch it.
This commit is contained in:
1 parent
048a8870e6
commit
1b2b50304e
1 file changed
+6
-17
+6
-17
@@ -63,24 +63,13 @@ jobs:
|
|||||||
- /data/gitea-pages:/data/gitea-pages
|
- /data/gitea-pages:/data/gitea-pages
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
# TEMPORARY (remove once understood): the image provably carries
|
# Fail fast when the job container is not the baked image: a stale
|
||||||
# the tool-cache entry (verified with `docker run --rm <image> ls
|
# tag on the runner (`forcePull=false` in its pull log) silently
|
||||||
# /opt/hostedtoolcache/node/26.8.2/x64/bin`), yet setup-node still
|
# reintroduces the per-job download. Mirrors the publish job's
|
||||||
# downloads. Print what the job container actually sees at
|
# NPM_TOKEN assert — cheap, and it names the invariant.
|
||||||
# runtime, mounts first — a mount over /opt/hostedtoolcache would
|
- name: Assert the baked tool cache is present
|
||||||
# hide the baked directory from the probe.
|
|
||||||
- name: Tool cache diagnostics
|
|
||||||
run: |
|
run: |
|
||||||
id
|
test -f "/opt/hostedtoolcache/node/$(tr -d '[:space:]' < .node-version)/x64.complete"
|
||||||
grep -E 'hostedtoolcache|workspace|overlay' /proc/mounts || true
|
|
||||||
ls -la /opt/hostedtoolcache || true
|
|
||||||
ls -la /opt/hostedtoolcache/node || true
|
|
||||||
ls -la "/opt/hostedtoolcache/node/$(tr -d '[:space:]' < .node-version)/" || true
|
|
||||||
test -f "/opt/hostedtoolcache/node/$(tr -d '[:space:]' < .node-version)/x64.complete" && echo MARKER-PRESENT || echo MARKER-MISSING
|
|
||||||
ls -la "/opt/hostedtoolcache/node/$(tr -d '[:space:]' < .node-version)/x64/bin" || true
|
|
||||||
"/opt/hostedtoolcache/node/$(tr -d '[:space:]' < .node-version)/x64/bin/node" -v || true
|
|
||||||
env | grep -iE 'RUNNER|TOOL|CACHE' || true
|
|
||||||
head -2 /etc/os-release
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
node-version-file: .node-version
|
node-version-file: .node-version
|
||||||
|
|||||||
Reference in new issue
Block a user