From 7baaa60cf2660f55d96d450a4a61bd9770cb77de Mon Sep 17 00:00:00 2001 From: Felitendo <95575686+Felitendo@users.noreply.github.com> Date: Fri, 17 Jul 2026 09:46:28 +0200 Subject: [PATCH] Fix dubious-ownership git error in CI container --- scripts/update-package.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/update-package.sh b/scripts/update-package.sh index e6c7da2..026eb63 100644 --- a/scripts/update-package.sh +++ b/scripts/update-package.sh @@ -17,6 +17,12 @@ repo_root="$(cd "$(dirname "$0")/.." && pwd)" cd "$repo_root" pkg="${pkg%/}" +# In the CI container the checkout is owned by a different uid than root; +# git (also invoked internally by gh) refuses to touch it without this. +if [[ "${CI:-}" == "true" ]]; then + git config --global --add safe.directory "$repo_root" +fi + source "$pkg/pkg.sh" ver="$(latest_version || true)" @@ -86,7 +92,6 @@ rm -f "$pkg/$asset" "$pkg"/*.pkg.tar.* ### 4: commit back to this repository ######################################## if [[ "${CI:-}" == "true" ]]; then - git config --global --add safe.directory "$repo_root" git config user.name "github-actions[bot]" git config user.email "41898282+github-actions[bot]@users.noreply.github.com"