Skip to content

Commit 3b273c2

Browse files
committed
fix(ci): run the helm-unittest container as the runner UID
The digest-pinned image runs as a non-root user that cannot write into the runner-owned bind mount (it creates tests/__snapshot__, absent from the checkout since empty dirs aren't tracked). Standard bind-mount pattern: --user "$(id -u):$(id -g)" with HOME=/tmp for helm's cache.
1 parent e4b34ca commit 3b273c2

1 file changed

Lines changed: 5 additions & 2 deletions

File tree

.github/workflows/helm.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,11 @@ jobs:
3737

3838
- name: Helm unit tests
3939
run: |
40-
# Official helm-unittest image, pinned by immutable digest (tag 3.17.3-0.8.2)
41-
docker run --rm -v "$PWD/helm/sim:/apps" \
40+
# Official helm-unittest image, pinned by immutable digest (tag 3.17.3-0.8.2).
41+
# Run as the runner's UID so the container can write into the bind
42+
# mount (it creates tests/__snapshot__), with a writable HOME for helm.
43+
docker run --rm --user "$(id -u):$(id -g)" -e HOME=/tmp \
44+
-v "$PWD/helm/sim:/apps" \
4245
helmunittest/helm-unittest@sha256:b653db7d5665bc6cec677b15c5eaa1c0377c0de8ac4eb1df58b924478baa21e1 .
4346
4447
- name: Install kubeconform

0 commit comments

Comments
 (0)