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 245f09fb7c
commit 2ff04aef55
3 changed files with 17 additions and 4 deletions
+2
View File
@@ -50,6 +50,7 @@ jobs:
- name: script
id: required
run: |
git config --global --add safe.directory '*'
cargo clippy --all-targets --all-features --locked --workspace --quiet
check-try-runtime:
@@ -77,6 +78,7 @@ jobs:
- name: script
id: required
run: |
git config --global --add safe.directory '*'
cargo check --locked --all --features try-runtime --quiet
# Check that teyrchain-template will compile with `try-runtime` feature flag.
cargo check --locked -p teyrchain-template-node --features try-runtime