From c5cf0f10b62f0686295dab28eb2546c61ddfb06a Mon Sep 17 00:00:00 2001 From: zack Date: Sat, 19 Oct 2024 20:32:25 -0400 Subject: [PATCH] fix: only run if changed --- .github/workflows/update.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/update.yml b/.github/workflows/update.yml index 0efb9fd..c91130d 100644 --- a/.github/workflows/update.yml +++ b/.github/workflows/update.yml @@ -107,14 +107,14 @@ jobs: echo "BUILD_SUCCESS=false" >> $GITHUB_OUTPUT # Timeout, consider as failure - name: Merge PR if build succeeds - if: steps.wait-for-build.outputs.BUILD_SUCCESS == 'true' + if: steps.git-check.outputs.CHANGED == 'true' && steps.wait-for-build.outputs.BUILD_SUCCESS == 'true' run: | gh pr merge ${{ steps.create-pr.outputs.pull-request-number }} --merge env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} - name: Schedule retry if build fails - if: steps.wait-for-build.outputs.BUILD_SUCCESS != 'true' + if: steps.git-check.outputs.CHANGED == 'true' && steps.wait-for-build.outputs.BUILD_SUCCESS != 'true' uses: peter-evans/create-or-update-comment@v3 with: issue-number: ${{ steps.create-pr.outputs.pull-request-number }} @@ -122,7 +122,7 @@ jobs: The Hydra build failed. This PR will be updated and retried in 24 hours. - name: Retry update after 24 hours - if: steps.wait-for-build.outputs.BUILD_SUCCESS != 'true' + if: steps.git-check.outputs.CHANGED == 'true' && steps.wait-for-build.outputs.BUILD_SUCCESS != 'true' uses: peter-evans/repository-dispatch@v2 with: event-type: retry-flake-update