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:
Kurdistan Tech Ministry committed 2026-01-28 04:37:43 +03:00
1 parent 245f09fb7c
commit 2ff04aef55
3 files changed
+17 -4

No files matched your search

+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