Skip to content

Commit 8244f43

Browse files
committed
[ci skip] Try to fix commit count?
1 parent 0b63a44 commit 8244f43

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

.github/workflows/modrinth.yml

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -42,9 +42,11 @@ jobs:
4242
git log --since="24 hours ago" --pretty=format:'%h - %s (%cr)' || echo "Git log command failed"
4343
4444
echo "\nChecking for commits in the last 24 hours..."
45-
COMMITS=$(git log --since="24 hours ago" --pretty=format:'%H' | wc -l)
46-
if [ "$COMMITS" -gt 0 ]; then
47-
echo "Found $COMMITS commits in the last 24 hours"
45+
46+
COMMIT_COUNT=$(git rev-list --count --since="24 hours ago" HEAD)
47+
echo "Found $COMMIT_COUNT commits in the last 24 hours"
48+
49+
if [ "$COMMIT_COUNT" -gt 0 ]; then
4850
echo "::set-output name=should_run::true"
4951
else
5052
echo "No commits found in the last 24 hours"

0 commit comments

Comments
 (0)