Skip to content

Commit 54ea593

Browse files
jiaenrenclaude
andcommitted
Add git lfs uninstall --local before checkout on self-hosted runners
Cleans up stale LFS hooks left by previous jobs on shared self-hosted runners, preventing "Hook already exists: pre-push" failures. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1 parent f6535b9 commit 54ea593

2 files changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/coverage.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,9 @@ jobs:
107107
echo "Docker version: $(docker --version)"
108108
echo "Git LFS version: $(git-lfs --version)"
109109
110+
- name: Clean up stale LFS hooks
111+
run: git lfs uninstall --local || true
112+
110113
- name: Checkout
111114
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
112115
with:

.github/workflows/pr-checks.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -188,6 +188,9 @@ jobs:
188188
echo "Docker version: $(docker --version)"
189189
echo "Git LFS version: $(git-lfs --version)"
190190
191+
- name: Clean up stale LFS hooks
192+
run: git lfs uninstall --local || true
193+
191194
- name: Checkout
192195
uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
193196
with:

0 commit comments

Comments
 (0)