From da7c4ac612a1e82263dbc1d17a578064c1f7abb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E4=B8=A5=E6=B5=A9?= Date: Wed, 9 Oct 2024 11:46:38 +0800 Subject: [PATCH] =?UTF-8?q?feat:=20=E6=B7=BB=E5=8A=A0=E6=A3=80=E6=9F=A5=20?= =?UTF-8?q?.git=20=E6=96=87=E4=BB=B6=E5=A4=B9=E7=9A=84=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/ci.yml | 1 - setup-node-environment/action.yml | 12 ++++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cf0d703..99e01ea 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -26,7 +26,6 @@ jobs: run: | echo ${{ steps.semantic.outputs.next_release_published }} echo ${{ steps.semantic.outputs.next_release_version }} - - name: Login to Docker Hub uses: docker/login-action@v3 with: diff --git a/setup-node-environment/action.yml b/setup-node-environment/action.yml index 01dedae..b737aba 100644 --- a/setup-node-environment/action.yml +++ b/setup-node-environment/action.yml @@ -16,7 +16,19 @@ description: "Setup pnpm + Node.js + install dependencies" runs: using: "composite" steps: + - name: Check .git folder + id: check-git-folder + shell: bash + run: | + if [ -d .git ]; then + echo "Found .git folder" + echo "git-folder-exists=true" >> $GITHUB_OUTPUT + else + echo "No .git folder found" + echo "git-folder-exists=false" >> $GITHUB_OUTPUT + fi - uses: actions/checkout@main + if: steps.check-git-folder.outputs.git-folder-exists == 'false' with: # fetch-depth: 0 # zero stands for full checkout, which is required for semantic-release filter: blob:none # we don't need all blobs, only the full tree