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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user