From 65db2dbfcbaa1e93042dca7271578b309dc4382b Mon Sep 17 00:00:00 2001 From: Franz Busch Date: Tue, 20 Aug 2024 09:50:03 +0100 Subject: [PATCH] [CI] Mark the workspace as safe for the matrix job (#2848) # Motivation Some scripts that run as part of a matrix job may want to call git commands and the workspace needs to be marked as safe. # Modification This PR adds a step to mark the workspace as safe --- .github/workflows/swift_matrix.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/swift_matrix.yml b/.github/workflows/swift_matrix.yml index 76ba7a87f..f1182370f 100644 --- a/.github/workflows/swift_matrix.yml +++ b/.github/workflows/swift_matrix.yml @@ -83,6 +83,9 @@ jobs: uses: actions/checkout@v4 with: persist-credentials: false + - name: Mark the workspace as safe + # https://github.com/actions/checkout/issues/766 + run: git config --global --add safe.directory ${GITHUB_WORKSPACE} - name: Run matrix job if: ${{ matrix.swift.enabled }} env: