From 0c11ec38b5ca8f6807063388b273270181edc99e Mon Sep 17 00:00:00 2001 From: jacobrein Date: Fri, 27 Dec 2024 12:16:23 -0700 Subject: [PATCH] Refactor: Update nightly release workflow to count new commits This commit updates the nightly release workflow to accurately count new commits. - Adds a checkout step with `fetch-depth: 0` to ensure all commits are fetched. - Uses `git log` to count the number of commits made in the last 24 hours. --- .github/workflows/nightly_release.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/workflows/nightly_release.yaml b/.github/workflows/nightly_release.yaml index 0b1de13f..83b172f7 100644 --- a/.github/workflows/nightly_release.yaml +++ b/.github/workflows/nightly_release.yaml @@ -11,6 +11,10 @@ jobs: name: Check for new commits runs-on: ubuntu-latest steps: + - name: Checkout + uses: actions/checkout@v4 + with: + fetch-depth: 0 # Required to count the commits - name: Get new commits run: echo "NEW_COMMIT_COUNT=$(git log --oneline --since '24 hours ago' | wc -l)" >> $GITHUB_ENV