From 3c260c5a5aa6ba42aa4e8a8d11d68fff8b9a86fa Mon Sep 17 00:00:00 2001 From: Philippe Serhal Date: Wed, 11 Dec 2024 11:15:15 -0500 Subject: [PATCH] ci: only git fetch HEAD unless more is needed --- .github/workflows/pre-release.yml | 1 + .github/workflows/typescript-nudge.yml | 2 -- .github/workflows/workflow.yml | 6 ------ 3 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/pre-release.yml b/.github/workflows/pre-release.yml index e23983c9cc..5429d631d0 100644 --- a/.github/workflows/pre-release.yml +++ b/.github/workflows/pre-release.yml @@ -10,6 +10,7 @@ jobs: steps: - uses: actions/checkout@v4 with: + # Needed for git tag updates below fetch-depth: 0 - uses: actions/setup-node@v4 with: diff --git a/.github/workflows/typescript-nudge.yml b/.github/workflows/typescript-nudge.yml index bb1c0b0b5b..13c49b60b4 100644 --- a/.github/workflows/typescript-nudge.yml +++ b/.github/workflows/typescript-nudge.yml @@ -13,8 +13,6 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - with: - fetch-depth: 0 - name: 🔎 Get changed JavaScript files id: changed-javascript-files diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index bc94a7a980..ee6bb5e16a 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -20,8 +20,6 @@ jobs: echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT if: ${{ startsWith(github.head_ref, 'release-') }} - uses: actions/checkout@v4 - with: - fetch-depth: 0 if: ${{ !steps.release-check.outputs.IS_RELEASE }} - uses: nrwl/nx-set-shas@v3 if: ${{ !steps.release-check.outputs.IS_RELEASE }} @@ -74,8 +72,6 @@ jobs: echo "IS_RELEASE=true" >> $env:GITHUB_OUTPUT if: ${{ startsWith(github.head_ref, 'release-') }} - uses: actions/checkout@v4 - with: - fetch-depth: 0 if: ${{ !steps.release-check.outputs.IS_RELEASE }} - uses: nrwl/nx-set-shas@v3 if: ${{ !steps.release-check.outputs.IS_RELEASE }} @@ -183,8 +179,6 @@ jobs: if: ${{ startsWith(github.head_ref, 'release-') }} - name: Git checkout uses: actions/checkout@v4 - with: - fetch-depth: 0 if: ${{ !steps.release-check.outputs.IS_RELEASE }} - name: setup pnpm/yarn run: corepack enable