From e8a4f0d9af11031675fb5f0a1f15249b9b1978a8 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Mon, 13 Nov 2023 12:19:20 -0500 Subject: [PATCH] Only notify about successful deploy if successful (#46051) --- .github/workflows/notify-about-deployment.yml | 7 ++++++- .github/workflows/purge-fastly.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/notify-about-deployment.yml b/.github/workflows/notify-about-deployment.yml index 7e3a03e582..12b6c3cb86 100644 --- a/.github/workflows/notify-about-deployment.yml +++ b/.github/workflows/notify-about-deployment.yml @@ -18,7 +18,12 @@ permissions: jobs: find-pr-and-post-comment: - if: ${{ github.repository == 'github/docs-internal' }} + if: >- + ${{ + github.repository == 'github/docs-internal' && + (github.event_name != 'workflow_run' || + github.event.workflow_run.conclusion == 'success') + }} runs-on: ubuntu-latest steps: - name: Check out repo diff --git a/.github/workflows/purge-fastly.yml b/.github/workflows/purge-fastly.yml index d615090796..e8278eed23 100644 --- a/.github/workflows/purge-fastly.yml +++ b/.github/workflows/purge-fastly.yml @@ -30,7 +30,12 @@ env: jobs: send-purges: - if: ${{ github.repository == 'github/docs-internal' && (github.event_name != 'workflow_run' || github.event.workflow_run.conclusion == 'success') }} + if: >- + ${{ + github.repository == 'github/docs-internal' && + (github.event_name != 'workflow_run' || + github.event.workflow_run.conclusion == 'success') + }} runs-on: ubuntu-latest steps: - name: Check out repo