From 20a0df73623ae85d825b8db9b77e8d903976ef57 Mon Sep 17 00:00:00 2001 From: Andrei <168741329+andreiborza@users.noreply.github.com> Date: Wed, 12 Feb 2025 18:13:34 +0100 Subject: [PATCH] fix: Mark `GITHUB_WORKSPACE` a safe git directory (#260) * fix: Mark `GITHUB_WORKSPACE` a safe git directory * Add integration test --- .github/workflows/test.yml | 18 ++++++++++++++++++ action.yml | 2 +- 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 600432d..57d81c4 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -61,6 +61,24 @@ jobs: with: ignore_missing: true + runs-on-container: + runs-on: ubuntu-latest + container: + image: node:18.17 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Create a staging release + uses: ./ + env: + SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }} + SENTRY_LOG_LEVEL: debug + with: + ignore_missing: true + mock-release: strategy: matrix: diff --git a/action.yml b/action.yml index 4c46134..26331d4 100644 --- a/action.yml +++ b/action.yml @@ -62,7 +62,7 @@ runs: if: ${{ inputs.disable_safe_directory != 'true' }} shell: bash run: | - git config --global --add safe.directory ${{ github.workspace }} + git config --global --add safe.directory "$GITHUB_WORKSPACE" - name: Get node version shell: bash