fix(ci): use full clone to prevent history loss on amend + force push

actions/checkout@v4 defaults to depth=1. When the CI amends the
triggering commit and force-pushes, the shallow history replaces
the full history on the remote — wiping all prior commits.

Fix: set fetch-depth: 0 for full clone.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
wangzhuc 2026-04-02 00:00:40 +08:00
parent 0871162634
commit ae37aa49e1

View file

@ -21,6 +21,8 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-python@v5 - uses: actions/setup-python@v5
with: with: