mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
fix(ci): use --replace-all for git safe.directory to prevent self-hosted runner failure
Some checks are pending
CI / test (push) Waiting to run
Some checks are pending
CI / test (push) Waiting to run
On self-hosted runners, _github_home/.gitconfig persists across jobs. The ocr-review workflow used --add which accumulated multiple safe.directory values over time. Once multiple values existed, other workflows using plain git config (without --add/--replace-all) failed with "cannot overwrite multiple values with a single value". Unify all workflows to use --replace-all, which clears previous values and writes exactly one entry regardless of prior state.
This commit is contained in:
parent
0d601eaf58
commit
0881ad87b8
4 changed files with 6 additions and 6 deletions
2
.github/workflows/ci.yml
vendored
2
.github/workflows/ci.yml
vendored
|
|
@ -19,7 +19,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Trust workspace
|
||||
run: git config --global safe.directory '*'
|
||||
run: git config --global --replace-all safe.directory '*'
|
||||
|
||||
- name: Vet
|
||||
run: go vet ./...
|
||||
|
|
|
|||
2
.github/workflows/deploy-pages.yml
vendored
2
.github/workflows/deploy-pages.yml
vendored
|
|
@ -25,7 +25,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Trust workspace
|
||||
run: git config --global safe.directory '*'
|
||||
run: git config --global --replace-all safe.directory '*'
|
||||
|
||||
- name: Install dependencies
|
||||
working-directory: pages
|
||||
|
|
|
|||
2
.github/workflows/ocr-review.yml
vendored
2
.github/workflows/ocr-review.yml
vendored
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Mark repository as safe directory
|
||||
run: git config --global --add safe.directory '*'
|
||||
run: git config --global --replace-all safe.directory '*'
|
||||
|
||||
- name: Fetch PR head ref (ensures fork commits are available)
|
||||
run: git fetch origin pull/${{ github.event.pull_request.number }}/head
|
||||
|
|
|
|||
6
.github/workflows/release.yml
vendored
6
.github/workflows/release.yml
vendored
|
|
@ -31,7 +31,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Trust workspace
|
||||
run: git config --global safe.directory '*'
|
||||
run: git config --global --replace-all safe.directory '*'
|
||||
|
||||
- name: Build
|
||||
env:
|
||||
|
|
@ -73,7 +73,7 @@ jobs:
|
|||
fetch-depth: 0
|
||||
|
||||
- name: Trust workspace
|
||||
run: git config --global safe.directory '*'
|
||||
run: git config --global --replace-all safe.directory '*'
|
||||
|
||||
- name: Generate release notes from commits
|
||||
id: notes
|
||||
|
|
@ -167,7 +167,7 @@ jobs:
|
|||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Trust workspace
|
||||
run: git config --global safe.directory '*'
|
||||
run: git config --global --replace-all safe.directory '*'
|
||||
|
||||
- name: Install jq
|
||||
run: apt-get update && apt-get install -y jq
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue