fix: add git safe.directory for containerized CI with persistent cache

When using persistent cargo cache mounted from host directory, the container
user differs from the directory owner, causing git "dubious ownership" error.
This fix adds `git config --global --add safe.directory '*'` before cargo
commands in containerized jobs.
This commit is contained in:
2026-01-28 04:37:43 +03:00
parent 785eba8322
commit 36b724ec4f
3 changed files with 17 additions and 4 deletions
+7 -2
View File
@@ -46,7 +46,9 @@ jobs:
run: rustup target add wasm32v1-none || true
- name: script
id: required
run: WASM_BUILD_NO_COLOR=1 cargo test -p pezstaging-node-cli --release --locked -- --ignored
run: |
git config --global --add safe.directory '*'
WASM_BUILD_NO_COLOR=1 cargo test -p pezstaging-node-cli --release --locked -- --ignored
# https://github.com/pezkuwichain/ci_cd/issues/864
test-linux-stable-runtime-benchmarks:
@@ -72,7 +74,9 @@ jobs:
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
- name: script
id: required
run: cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet
run: |
git config --global --add safe.directory '*'
cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet
test-linux-stable:
needs: [preflight]
@@ -154,6 +158,7 @@ jobs:
- name: script
id: required
run: |
git config --global --add safe.directory '*'
cargo nextest run --workspace \
--locked \
--release \