From a337733ee928a523f9725820bba607069820e255 Mon Sep 17 00:00:00 2001 From: Ferenc Szabo Date: Thu, 2 Jan 2025 17:22:58 +0100 Subject: [PATCH] fix: lint job exiting with 1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit In recent versions of Git, a security feature was introduced to prevent directory traversal attacks. Git now verifies that the directory it’s operating on is “safe.” If a repository resides in a directory owned by another user (common in CI environments where repositories are checked out dynamically), Git might refuse to operate unless explicitly configured. --- .github/workflows/lint.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/lint.yaml b/.github/workflows/lint.yaml index c801b7f..2f29e96 100644 --- a/.github/workflows/lint.yaml +++ b/.github/workflows/lint.yaml @@ -11,6 +11,9 @@ jobs: steps: - uses: actions/checkout@v3 + - name: Mark source directory as safe + run: git config --global --add safe.directory $GITHUB_WORKSPACE + - name: go.mod check run: | go mod tidy