ci: Mark our git clone as a safe directory

fatal: detected dubious ownership in repository at '/builds/whot/mutter'
To add an exception for this directory, call:
	git config --global --add safe.directory /builds/whot/mutter

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/3434>
This commit is contained in:
Peter Hutterer 2023-12-01 13:12:01 +10:00 committed by Marge Bot
parent c8191920e8
commit ef8b2f2893

View File

@ -299,6 +299,7 @@ check-code-style:
- job: build-fedora-container@x86_64 - job: build-fedora-container@x86_64
artifacts: false artifacts: false
script: script:
git config --global --add safe.directory $CI_PROJECT_DIR ;
git remote add target $CI_MERGE_REQUEST_PROJECT_URL.git ; git remote add target $CI_MERGE_REQUEST_PROJECT_URL.git ;
git fetch target $CI_MERGE_REQUEST_TARGET_BRANCH_NAME ; git fetch target $CI_MERGE_REQUEST_TARGET_BRANCH_NAME ;
export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "target/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") <(git rev-list --first-parent HEAD) | head -1) ; export common_parent_sha=$(diff --old-line-format='' --new-line-format='' <(git rev-list --first-parent "target/$CI_MERGE_REQUEST_TARGET_BRANCH_NAME") <(git rev-list --first-parent HEAD) | head -1) ;