From 50ee0d23f406ca9b6915425fc30e303348badccc Mon Sep 17 00:00:00 2001 From: sirius Date: Fri, 27 Nov 2026 05:52:49 +0000 Subject: [PATCH] fix(f6): re-own the actions cache for the uid-1000 runner (#62) --- apps/base/forgejo/runner-amd64.yaml | 15 +++++++++++++-- apps/base/forgejo/runner-arm64.yaml | 15 +++++++++++++-- apps/base/forgejo/runner-deploy-arm64.yaml | 15 +++++++++++++-- 3 files changed, 39 insertions(+), 6 deletions(-) diff --git a/apps/base/forgejo/runner-amd64.yaml b/apps/base/forgejo/runner-amd64.yaml index d149d87..82f3ec4 100644 --- a/apps/base/forgejo/runner-amd64.yaml +++ b/apps/base/forgejo/runner-amd64.yaml @@ -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 diff --git a/apps/base/forgejo/runner-arm64.yaml b/apps/base/forgejo/runner-arm64.yaml index 1449767..4b16820 100644 --- a/apps/base/forgejo/runner-arm64.yaml +++ b/apps/base/forgejo/runner-arm64.yaml @@ -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 diff --git a/apps/base/forgejo/runner-deploy-arm64.yaml b/apps/base/forgejo/runner-deploy-arm64.yaml index f067bec..dc759cc 100644 --- a/apps/base/forgejo/runner-deploy-arm64.yaml +++ b/apps/base/forgejo/runner-deploy-arm64.yaml @@ -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