Skip to content

Commit 3d5697e

Browse files
SukuWcclaude
andcommitted
Fix permission denied error by matching container user to runner UID/GID
When using manual docker run instead of container: block, GitHub Actions no longer handles user mapping automatically. Files created by the root-running container were unwritable by the host runner. Pass --user $(id -u):$(id -g) to match the runner's identity. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent e218062 commit 3d5697e

2 files changed

Lines changed: 2 additions & 0 deletions

File tree

.github/workflows/electrical_workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,7 @@ jobs:
5656
docker tag ghcr.io/${{ github.repository_owner }}/knot-electrical-builder:latest builder:local
5757
fi
5858
docker run -d --name builder \
59+
--user $(id -u):$(id -g) \
5960
-v ${{ github.workspace }}:/work \
6061
-w /work \
6162
builder:local tail -f /dev/null

.github/workflows/mechanical_workflow.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ jobs:
6060
docker tag ghcr.io/${{ github.repository_owner }}/knot-mechanical-builder:latest builder:local
6161
fi
6262
docker run -d --name builder \
63+
--user $(id -u):$(id -g) \
6364
-v ${{ github.workspace }}:/work \
6465
-w /work \
6566
builder:local tail -f /dev/null

0 commit comments

Comments
 (0)