fix(ci): reclaim aur-repo ownership after docker chown (#49)
The 'Push to AUR' step failed on run 24195384571 with: error: could not lock config file .git/config: Permission denied Inside the docker block we 'chown -R builduser:builduser /pkg', which propagates through the bind mount and transfers ownership of aur-repo/ (including .git/) to the container's builduser UID. When control returns to the runner user, 'git config user.name' can no longer write .git/config and the step exits 255. Chown the directory back to the runner's UID/GID before resuming host-side git operations. Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit was merged in pull request #49.
This commit is contained in:
6
.github/workflows/publish-aur.yml
vendored
6
.github/workflows/publish-aur.yml
vendored
@@ -135,6 +135,12 @@ jobs:
|
||||
sudo -u builduser makepkg -od && sudo -u builduser makepkg --printsrcinfo > .SRCINFO
|
||||
"
|
||||
|
||||
# Reclaim ownership: the in-container 'chown -R builduser:builduser /pkg'
|
||||
# propagates through the bind mount, leaving .git/ owned by the container's
|
||||
# builduser UID. Without this, subsequent 'git config' on the host fails with
|
||||
# "could not lock config file .git/config: Permission denied".
|
||||
sudo chown -R "$(id -u):$(id -g)" .
|
||||
|
||||
# Set the commit identity using secrets for security and auditability.
|
||||
git config user.name "$AUR_USER"
|
||||
git config user.email "$AUR_EMAIL"
|
||||
|
||||
Reference in New Issue
Block a user