mirror of
https://github.com/yanhao98/composite-actions.git
synced 2025-07-13 06:40:49 +08:00
feat: 添加检查 .git 文件夹的步骤
This commit is contained in:
1
.github/workflows/ci.yml
vendored
1
.github/workflows/ci.yml
vendored
@ -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:
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user