Skip to content

Commit 8888033

Browse files
committed
fix main branch ci
1 parent a5a73fe commit 8888033

1 file changed

Lines changed: 1 addition & 2 deletions

File tree

.github/workflows/ci.yaml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,11 +65,10 @@ jobs:
6565
- name: Run pre-commits
6666
run: |
6767
CUR_SHA=$(git log --pretty=tformat:"%H" -n1 .)
68+
LAST_SHA=$(git log --pretty=tformat:"%H" -n2 | tail -n1)
6869
git fetch
6970
if [[ $GITHUB_REF == 'refs/heads/main' ]]; then
70-
LAST_SHA=$(git rev-parse HEAD^)
7171
pre-commit run --from-ref $LAST_SHA --to-ref $CUR_SHA
7272
else
7373
pre-commit run --from-ref origin/main --to-ref $CUR_SHA
7474
fi
75-
# pre-commit run --from-ref origin/main --to-ref $CUR_SHA

0 commit comments

Comments
 (0)