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:
@@ -38,8 +38,11 @@ jobs:
|
||||
# Exclude pezkuwi-zombienet-sdk-tests: its build.rs runs nested cargo build
|
||||
# which doesn't inherit workspace [patch.crates-io] settings, causing
|
||||
# serde_core duplicate lang item error. See: https://github.com/pezkuwichain/pezkuwi-sdk/issues/357
|
||||
- run: cargo test --doc --workspace --locked --all-features --exclude pezkuwi-zombienet-sdk-tests
|
||||
- name: script
|
||||
id: required
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
cargo test --doc --workspace --locked --all-features --exclude pezkuwi-zombienet-sdk-tests
|
||||
|
||||
build-rustdoc:
|
||||
runs-on: ${{ needs.preflight.outputs.RUNNER }}
|
||||
@@ -60,8 +63,11 @@ jobs:
|
||||
|
||||
# Exclude pezkuwi-zombienet-sdk-tests: nested cargo build in build.rs
|
||||
# doesn't inherit workspace patches. See test-doc job comment.
|
||||
- run: cargo doc --all-features --workspace --no-deps --locked --exclude pezkuwi-zombienet-sdk-tests
|
||||
- name: script
|
||||
id: required
|
||||
run: |
|
||||
git config --global --add safe.directory '*'
|
||||
cargo doc --all-features --workspace --no-deps --locked --exclude pezkuwi-zombienet-sdk-tests
|
||||
- run: rm -f ./target/doc/.lock
|
||||
- run: mv ./target/doc ./crate-docs
|
||||
- name: Inject Simple Analytics script
|
||||
|
||||
Reference in New Issue
Block a user