github/workflows: Fix git dubious ownership (#2223)

This commit is contained in:
Alexander Bayandin
2022-08-05 13:44:57 +01:00
committed by GitHub
parent 0a958b0ea1
commit 4cb1074fe5
2 changed files with 11 additions and 1 deletions

View File

@@ -35,6 +35,16 @@ jobs:
GIT_VERSION: ${{ github.sha }}
steps:
- name: Fix git ownerwhip
run: |
# Workaround for `fatal: detected dubious ownership in repository at ...`
#
# Use both ${{ github.workspace }} and ${GITHUB_WORKSPACE} because they're different on host and in containers
# Ref https://github.com/actions/checkout/issues/785
#
git config --global --add safe.directory ${{ github.workspace }}
git config --global --add safe.directory ${GITHUB_WORKSPACE}
- name: Checkout
uses: actions/checkout@v3
with: