From a07a7d4a1ca85ddf9f31c9cceefc593665334180 Mon Sep 17 00:00:00 2001 From: Akuli Date: Sun, 5 Jan 2025 14:15:16 +0200 Subject: [PATCH] Tweak git command --- .github/workflows/valgrind.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/valgrind.yml b/.github/workflows/valgrind.yml index b27e03c4..b7e1bb58 100644 --- a/.github/workflows/valgrind.yml +++ b/.github/workflows/valgrind.yml @@ -20,11 +20,11 @@ jobs: # Do not valgrind when there's nothing new to valgrind in the repo - name: Check if there was any commits within the last 24 hours run: | - if git log --oneline --since="24 hours ago" --name-only --pretty=format: | grep '.'; then - echo "recent_commits=true" >> $GITHUB_ENV - else + if git --no-pager log --oneline --since="24 seconds ago" --exit-code; then echo "No commits, will not run valgrind" echo "recent_commits=false" >> $GITHUB_ENV + else + echo "recent_commits=true" >> $GITHUB_ENV fi - if: env.recent_commits == 'true'