Skip to content

Commit 9e616f7

Browse files
authored
Fix the fetch depth
1 parent 4b27255 commit 9e616f7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

.github/workflows/release.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,11 +11,13 @@ jobs:
1111
steps:
1212
- name: Checkout Repository
1313
uses: actions/checkout@v4
14+
with:
15+
fetch-depth: 2 # Ensure we have at least the last commit to compare
1416

1517
- name: Check Modified Files
1618
id: check_changes
17-
run: |
18-
git fetch origin main
19+
run: | # Ensure history exists for comparison
20+
git fetch origin main --depth=2
1921
CHANGED_FILES=$(git diff --name-only HEAD^ HEAD)
2022
2123
# Check if cli_monitor.py or tests/ directory has been changed

0 commit comments

Comments
 (0)