mirror of
https://github.com/alibaba/open-code-review.git
synced 2026-07-09 17:28:58 +00:00
ci: fix dubious ownership error on self-hosted runners (#106)
Add safe.directory '*' to git config before running git operations. Self-hosted runners may run jobs under a different OS user than the one that owns the workspace, causing git to refuse operations with a 'dubious ownership' error.
This commit is contained in:
parent
022800c876
commit
3239640df4
1 changed files with 3 additions and 0 deletions
3
.github/workflows/ocr-review.yml
vendored
3
.github/workflows/ocr-review.yml
vendored
|
|
@ -45,6 +45,9 @@ jobs:
|
|||
fetch-depth: 0 # Full history needed for merge-base diff
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
|
||||
- name: Mark repository as safe directory
|
||||
run: git config --global --add safe.directory '*'
|
||||
|
||||
- name: Fetch PR head ref (ensures fork commits are available)
|
||||
run: git fetch origin pull/${{ github.event.pull_request.number }}/head
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue