keep the checkout owned by the runner when generating .SRCINFO

This commit is contained in:
pj committed 2026-09-03 11:30:50 +05:30
1 parent 17c3873723
commit 31a4aef5d2
1 file changed
+6 -5
+6 -5
View File
@@ -211,12 +211,13 @@ jobs:
echo "pkgver $VERSION, deb $SHA, licence $LICENSE_SHA" echo "pkgver $VERSION, deb $SHA, licence $LICENSE_SHA"
- name: Generate .SRCINFO - name: Generate .SRCINFO
# makepkg is Arch-only and refuses to run as root, hence the container and the throwaway # makepkg is Arch-only and refuses to run as root, hence the container. It runs as the
# user. --printsrcinfo parses the PKGBUILD, it does not build anything. # 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: | run: |
docker run --rm -v "$PWD:/w" -w /w archlinux:base-devel bash -c ' docker run --rm --user "$(id -u):$(id -g)" -e HOME=/tmp -v "$PWD:/w" -w /w \
useradd -m builder && chown -R builder /w archlinux:base-devel makepkg --printsrcinfo > .SRCINFO
su builder -c "makepkg --printsrcinfo" > .SRCINFO'
cat .SRCINFO cat .SRCINFO
- name: Push to the AUR - name: Push to the AUR