From dc6666415b69b55a26243132fe7476d015d6fd1f Mon Sep 17 00:00:00 2001 From: Innei Date: Fri, 27 Sep 2024 02:51:58 +0800 Subject: [PATCH] update Signed-off-by: Innei --- .github/workflows/release.yaml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 38eb926..fd1f469 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -14,22 +14,27 @@ jobs: check_changes: runs-on: ubuntu-latest outputs: - should_run: ${{ env.SHOULD_RUN }} + should_run: ${{ steps.check_changes.outputs.should_run }} steps: - uses: actions/checkout@v4 with: fetch-depth: 0 - name: Check for code changes + id: check_changes run: | if git diff --quiet @{1.day.ago} HEAD -- ':!.github'; then + echo "should_run=false" >> $GITHUB_OUTPUT echo "SHOULD_RUN=false" >> $GITHUB_ENV + echo "no changes detected" else + echo "should_run=true" >> $GITHUB_OUTPUT echo "SHOULD_RUN=true" >> $GITHUB_ENV + echo "changes detected" fi nightly-release: needs: check_changes - if: ${{ env.SHOULD_RUN == 'true' }} + if: needs.check_changes.outputs.should_run == 'true' runs-on: ${{ matrix.os }} strategy: