From 31a4aef5d2fd6c93d2642957d8ecb54aa8d7653c Mon Sep 17 00:00:00 2001 From: PJ Date: Thu, 3 Sep 2026 11:30:50 +0530 Subject: [PATCH] keep the checkout owned by the runner when generating .SRCINFO --- .github/workflows/release.yml | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 512380c..88d70c0 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -211,12 +211,13 @@ jobs: echo "pkgver $VERSION, deb $SHA, licence $LICENSE_SHA" - name: Generate .SRCINFO - # makepkg is Arch-only and refuses to run as root, hence the container and the throwaway - # user. --printsrcinfo parses the PKGBUILD, it does not build anything. + # makepkg is Arch-only and refuses to run as root, hence the container. It runs as the + # runner's own uid so nothing in the bind-mounted checkout changes owner; chowning it to a + # container user left the workspace unwritable for the push step. --printsrcinfo parses the + # PKGBUILD, it does not build anything. run: | - docker run --rm -v "$PWD:/w" -w /w archlinux:base-devel bash -c ' - useradd -m builder && chown -R builder /w - su builder -c "makepkg --printsrcinfo" > .SRCINFO' + docker run --rm --user "$(id -u):$(id -g)" -e HOME=/tmp -v "$PWD:/w" -w /w \ + archlinux:base-devel makepkg --printsrcinfo > .SRCINFO cat .SRCINFO - name: Push to the AUR