Skip to content

Commit 4887090

Browse files
committed
Simplify commit SHA checkout to avoid git fetch issues
- Use full history fetch for all runs to ensure commit availability - Remove problematic git fetch command that treated SHA as ref - Directly checkout commit SHA after full clone - Prioritize reliability over shallow clone optimization This should resolve the "couldn't find remote ref" error when testing specific commits via workflow_dispatch. Signed-off-by: [email protected]
1 parent a8cf2c9 commit 4887090

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

.github/workflows/main-push-fast.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,12 @@ jobs:
2929
steps:
3030
- uses: actions/checkout@v4
3131
with:
32-
fetch-depth: ${{ github.event.inputs.commit_sha && 0 || 2 }}
32+
fetch-depth: 0 # Always use full history for manual runs to find any commit
3333

3434
- name: Checkout specific commit
3535
if: github.event.inputs.commit_sha
3636
run: |
37-
git fetch origin ${{ github.event.inputs.commit_sha }}
37+
echo "Checking out specific commit: ${{ github.event.inputs.commit_sha }}"
3838
git checkout ${{ github.event.inputs.commit_sha }}
3939
4040
- uses: actions/setup-java@v4

0 commit comments

Comments
 (0)