Skip to content

Commit 0e65f9b

Browse files
authored
Enhance Git checkout process in Lunaria workflow
Added steps to ensure complete Git history and verify Git state.
1 parent ffba14e commit 0e65f9b

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/lunaria.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,12 +18,23 @@ jobs:
1818
runs-on: ubuntu-latest
1919

2020
steps:
21-
- name: Checkout
22-
uses: actions/checkout@v4
21+
- uses: actions/checkout@v4
2322
with:
24-
# Necessary for Lunaria to work properly
25-
# Makes the action clone the entire git history
2623
fetch-depth: 0
24+
25+
- name: Ensure complete Git history
26+
run: |
27+
git config --global --add safe.directory $PWD
28+
if [ -f .git/shallow ]; then
29+
git fetch --unshallow origin || echo "Already unshallow"
30+
fi
31+
git fetch --tags || true
32+
33+
- name: Verify Git state
34+
run: |
35+
echo "Current branch: $(git branch --show-current)"
36+
echo "Commit count: $(git rev-list --count HEAD)"
37+
git log --oneline -3 || echo "No commits accessible"
2738
2839
- name: Setup Node
2940
uses: actions/setup-node@v4

0 commit comments

Comments
 (0)