fix: Use fetch to ensure main branch exists before checkout
- Change from 'git checkout main' to 'git fetch origin main:main'
- Ensures main branch ref exists in detached HEAD state
- Fixes 'pathspec main did not match' error
🤖 Generated with Claude Code
This commit is contained in:
@@ -122,8 +122,8 @@ jobs:
|
||||
if: github.ref_type == 'tag' || (github.event_name == 'repository_dispatch' && github.event.client_payload.pr_number != '')
|
||||
run: |
|
||||
# Checkout main branch to avoid detached HEAD when pushing
|
||||
git fetch origin main:main
|
||||
git checkout main
|
||||
git pull origin main
|
||||
# Extract the primary image tag for updating README
|
||||
if [[ "${{ github.ref_type }}" == "tag" ]]; then
|
||||
# For tag releases, use the version tag
|
||||
|
||||
Reference in New Issue
Block a user