Mark all directories as safe so CI builds don't fail with "unsafe repository" errors

This commit is contained in:
Sam V
2022-06-15 12:54:05 -07:00
committed by Fletcher Dunn
parent 1593fb4fa9
commit bbdb0774ed
2 changed files with 9 additions and 0 deletions
+4
View File
@@ -57,6 +57,10 @@ has_clang || has_gcc || die "No compiler available"
export CCACHE_DIR=$PWD/build-ci-ccache
ccache -M4G
# Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors.
# See https://github.com/actions/checkout/issues/766
git config --global --add safe.directory '*'
# Use shallow clones of submodules for space/time efficiency.
#git submodule update --init --depth=1 2>&1 | cat
+5
View File
@@ -55,6 +55,11 @@ jobs:
cd build
cmake -S .. -G Ninja -DBUILD_TESTS=ON -DBUILD_EXAMPLES=ON -DBUILD_TOOLS=ON
# Mark all directories as safe so checkouts performed in CMakeLists.txt don't cause "unsafe repository" errors.
# See https://github.com/actions/checkout/issues/766
- name: Configure Git
run: git config --global --add safe.directory '*'
- name: Build projects
working-directory: '${{ github.workspace }}/build'
run: ninja