From 8a722ac5cb47200cb36e5f5581c02589c3a32fc6 Mon Sep 17 00:00:00 2001 From: Sarah Gibson Date: Thu, 19 Dec 2024 13:26:23 +0000 Subject: [PATCH] Update condition of reset-jobs job --- .github/workflows/deploy-hubs.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy-hubs.yaml b/.github/workflows/deploy-hubs.yaml index 20672669b..c3af3387f 100644 --- a/.github/workflows/deploy-hubs.yaml +++ b/.github/workflows/deploy-hubs.yaml @@ -369,7 +369,11 @@ jobs: runs-on: ubuntu-latest needs: [generate-jobs, filter-failed-support] if: | - !cancelled() + !cancelled() && + (github.event_name == 'push' && contains(github.ref, 'main')) && + needs.generate-jobs.result == 'success' && + needs.generate-jobs.outputs.staging-jobs != '[]' && + needs.generate-jobs.outputs.prod-jobs != '[]' outputs: staging-jobs: ${{ steps.reset-jobs.outputs.staging-jobs }} prod-jobs: ${{ steps.reset-jobs.outputs.prod-jobs }}