feat: 添加检查 .git 文件夹的步骤

This commit is contained in:
严浩
2024-10-09 11:46:38 +08:00
parent aca6c13ecb
commit da7c4ac612
2 changed files with 12 additions and 1 deletions

View File

@ -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:

View File

@ -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