From 94092bc52e353e31574f48703b2ca6efb4dbfb5c Mon Sep 17 00:00:00 2001 From: "Zaiming (Stone) Shi" Date: Thu, 26 May 2022 23:57:27 +0200 Subject: [PATCH] ci: ensure _build dir is owned by root so the git command can run without safe.directory config for cloned dependencies --- scripts/buildx.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/scripts/buildx.sh b/scripts/buildx.sh index 749ca565e..f15069f86 100755 --- a/scripts/buildx.sh +++ b/scripts/buildx.sh @@ -76,5 +76,6 @@ docker run -i --rm \ -v "$(pwd)":/emqx \ --workdir /emqx \ --platform="linux/$ARCH" \ + --user root \ "$BUILDER" \ - bash -euc "git config --global --add safe.directory /emqx && make ${PROFILE}-${PKGTYPE} && .ci/build_packages/tests.sh $PROFILE $PKGTYPE" + bash -euc "git config --global --add safe.directory /emqx && chown -R root:root _build && make ${PROFILE}-${PKGTYPE} && .ci/build_packages/tests.sh $PROFILE $PKGTYPE"