Fix dubious-ownership git error in CI container
This commit is contained in:
1 parent
6f7398075a
commit
7baaa60cf2
1 file changed
+6
-1
@@ -17,6 +17,12 @@ repo_root="$(cd "$(dirname "$0")/.." && pwd)"
|
|||||||
cd "$repo_root"
|
cd "$repo_root"
|
||||||
pkg="${pkg%/}"
|
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"
|
source "$pkg/pkg.sh"
|
||||||
|
|
||||||
ver="$(latest_version || true)"
|
ver="$(latest_version || true)"
|
||||||
@@ -86,7 +92,6 @@ rm -f "$pkg/$asset" "$pkg"/*.pkg.tar.*
|
|||||||
### 4: commit back to this repository ########################################
|
### 4: commit back to this repository ########################################
|
||||||
|
|
||||||
if [[ "${CI:-}" == "true" ]]; then
|
if [[ "${CI:-}" == "true" ]]; then
|
||||||
git config --global --add safe.directory "$repo_root"
|
|
||||||
git config user.name "github-actions[bot]"
|
git config user.name "github-actions[bot]"
|
||||||
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
git config user.email "41898282+github-actions[bot]@users.noreply.github.com"
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user