From 9533889b643f8274e8a0aae5583b022ddb1f5ee3 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Sun, 8 May 2022 15:03:07 +0200 Subject: [PATCH] ci: do not set `safe.directory` for commitlint checkout Commitlint fails with errors like: ``` git fetch -v origin devel fatal: unsafe repository ('/go/src/github.com/ceph/ceph-csi' is owned by someone else) To add an exception for this directory, call: git config --global --add safe.directory /go/src/github.com/ceph/ceph-csi make: *** [Makefile:153: commitlint] Error 128 ``` By not setting the option with actions/checkout@v3, the error should not happen anymore. Signed-off-by: Niels de Vos --- .github/workflows/commitlint.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/commitlint.yaml b/.github/workflows/commitlint.yaml index 05338adac..2bceb4aed 100644 --- a/.github/workflows/commitlint.yaml +++ b/.github/workflows/commitlint.yaml @@ -17,6 +17,7 @@ jobs: - uses: actions/checkout@v3 with: ref: ${{ github.event.pull_request.head.sha }} + set-safe-directory: false - name: commitlint # yamllint disable-line rule:line-length run: make containerized-test CONTAINER_CMD=docker TARGET=commitlint GIT_SINCE="origin/${GITHUB_BASE_REF}"