Skip to content

Commit e661fc2

Browse files
committed
Use $GITHUB_WORKSPACE for the safe.directory config
1 parent fe73244 commit e661fc2

2 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/tests-linux-stable-xp.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ jobs:
4646
id: required
4747
run: |
4848
# Fixes "detected dubious ownership" error in the ci
49-
git config --global --add safe.directory '*'
49+
git config --global --add safe.directory $GITHUB_WORKSPACE
5050
forklift cargo nextest run --workspace \
5151
--locked \
5252
--release \
@@ -85,7 +85,7 @@ jobs:
8585
id: required
8686
run: |
8787
# Fixes "detected dubious ownership" error in the ci
88-
git config --global --add safe.directory '*'
88+
git config --global --add safe.directory $GITHUB_WORKSPACE
8989
forklift cargo nextest run \
9090
--workspace \
9191
--locked \

.github/workflows/tests-linux-stable.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,10 @@ jobs:
3838
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
3939
- name: script
4040
id: required
41-
run: WASM_BUILD_NO_COLOR=1 forklift cargo test -p staging-node-cli --release --locked -- --ignored
41+
run: |
42+
# Fixes "detected dubious ownership" error in the ci
43+
git config --global --add safe.directory $GITHUB_WORKSPACE
44+
WASM_BUILD_NO_COLOR=1 forklift cargo test -p staging-node-cli --release --locked -- --ignored
4245
- name: Stop all workflows if failed
4346
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
4447
uses: ./.github/actions/workflow-stopper
@@ -64,7 +67,10 @@ jobs:
6467
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0
6568
- name: script
6669
id: required
67-
run: forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet
70+
run: |
71+
# Fixes "detected dubious ownership" error in the ci
72+
git config --global --add safe.directory $GITHUB_WORKSPACE
73+
forklift cargo nextest run --workspace --features runtime-benchmarks benchmark --locked --cargo-profile testnet --cargo-quiet
6874
- name: Stop all workflows if failed
6975
if: ${{ failure() && steps.required.conclusion == 'failure' && !github.event.pull_request.head.repo.fork }}
7076
uses: ./.github/actions/workflow-stopper
@@ -102,7 +108,7 @@ jobs:
102108
id: required
103109
run: |
104110
# Fixes "detected dubious ownership" error in the ci
105-
git config --global --add safe.directory '*'
111+
git config --global --add safe.directory $GITHUB_WORKSPACE
106112
forklift cargo nextest run \
107113
--workspace \
108114
--locked \

0 commit comments

Comments
 (0)