Skip to content

Commit 9bd416d

Browse files
committed
clean
1 parent 6f136c7 commit 9bd416d

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

.github/workflows/ci.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -72,13 +72,14 @@ jobs:
7272
7373
git fetch
7474
CUR_SHA=$(git log --pretty=tformat:"%H" -n1 . | tail -n1)
75-
LAST_SHA=$(git log --pretty=tformat:"%H" -n3 . | tail -n1)
7675
7776
echo "Default branch is $DEFAULT_BRANCH"
7877
echo "Current SHA is $CUR_SHA"
79-
echo "Last SHA is $LAST_SHA"
8078
8179
if [[ $GITHUB_REF == "refs/heads/$DEFAULT_BRANCH" ]]; then
80+
git pull origin $DEFAULT_BRANCH
81+
LAST_SHA=$(git log --pretty=tformat:"%H" -n2 . | tail -n1)
82+
echo "Last SHA is $LAST_SHA"
8283
pre-commit run --from-ref $LAST_SHA --to-ref $CUR_SHA
8384
else
8485
pre-commit run --from-ref origin/$DEFAULT_BRANCH --to-ref $CUR_SHA

0 commit comments

Comments
 (0)