diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 139f51a..80db345 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -27,8 +27,11 @@ jobs: - name: Derive Nx affected base and head shell: bash run: | + # `actions/checkout@v4` with fetch-depth: 0 already pulls every + # branch and tag, so origin/ is present locally — no + # extra `git fetch` is needed (and `--depth=0` is invalid: git + # requires a positive integer). if [ "${{ github.event_name }}" = "pull_request" ]; then - git fetch origin "${{ github.base_ref }}" --depth=0 echo "NX_BASE=$(git merge-base HEAD origin/${{ github.base_ref }})" >> "$GITHUB_ENV" else echo "NX_BASE=HEAD~1" >> "$GITHUB_ENV"