fix(f6): re-own the actions cache for the uid-1000 runner (#62)

This commit is contained in:
sirius 2026-11-27 05:52:49 +00:00
commit 50ee0d23f4
3 changed files with 39 additions and 6 deletions

View file

@ -87,8 +87,19 @@ spec:
- |
set -e
chown 1000:1000 /data
[ -f /data/runner.ini ] && chown 1000:1000 /data/runner.ini
[ -d /data/cache ] && chown -R 1000:1000 /data/cache
# Re-own every entry the runner writes as uid 1000 — runner.ini,
# cache/ and the actions cache .cache/act/ where it clones the
# action repos (a stale root-owned pack file there fails the job
# with "permission denied"). Skip `docker`, the dind data-root,
# which stays root-owned: a recursive chown of that tree is tens
# of GB on the Pi. The owner check makes repeat starts cheap.
for d in /data/* /data/.[!.]*; do
if [ ! -e "$d" ]; then continue; fi
if [ "$d" = /data/docker ]; then continue; fi
if [ "$(stat -c %u "$d")" != 1000 ]; then
chown -R 1000:1000 "$d"
fi
done
true
volumeMounts:
- name: data

View file

@ -53,8 +53,19 @@ spec:
- |
set -e
chown 1000:1000 /data
[ -f /data/runner.ini ] && chown 1000:1000 /data/runner.ini
[ -d /data/cache ] && chown -R 1000:1000 /data/cache
# Re-own every entry the runner writes as uid 1000 — runner.ini,
# cache/ and the actions cache .cache/act/ where it clones the
# action repos (a stale root-owned pack file there fails the job
# with "permission denied"). Skip `docker`, the dind data-root,
# which stays root-owned: a recursive chown of that tree is tens
# of GB on the Pi. The owner check makes repeat starts cheap.
for d in /data/* /data/.[!.]*; do
if [ ! -e "$d" ]; then continue; fi
if [ "$d" = /data/docker ]; then continue; fi
if [ "$(stat -c %u "$d")" != 1000 ]; then
chown -R 1000:1000 "$d"
fi
done
true
volumeMounts:
- name: data

View file

@ -92,8 +92,19 @@ spec:
- |
set -e
chown 1000:1000 /data
[ -f /data/runner.ini ] && chown 1000:1000 /data/runner.ini
[ -d /data/cache ] && chown -R 1000:1000 /data/cache
# Re-own every entry the runner writes as uid 1000 — runner.ini,
# cache/ and the actions cache .cache/act/ where it clones the
# action repos (a stale root-owned pack file there fails the job
# with "permission denied"). Skip `docker`, the dind data-root,
# which stays root-owned: a recursive chown of that tree is tens
# of GB on the Pi. The owner check makes repeat starts cheap.
for d in /data/* /data/.[!.]*; do
if [ ! -e "$d" ]; then continue; fi
if [ "$d" = /data/docker ]; then continue; fi
if [ "$(stat -c %u "$d")" != 1000 ]; then
chown -R 1000:1000 "$d"
fi
done
true
volumeMounts:
- name: data