From 69b661f6877b15b209c17d5e7aaec57925497dd0 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 5 Aug 2021 14:36:17 +0000 Subject: [PATCH] Build/Test Tools: Correctly check for the trigger event when running the Slack notifications workflow. This updates the conditional check for the Slack notifications workflow to check the event of the original workflow and not the one requested through the `workflow_run:completed` event. The run triggering the event is accessible at `github.event.workflow_run`. Props Clorith. See #52644. git-svn-id: https://develop.svn.wordpress.org/trunk@51555 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/slack-notifications.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/slack-notifications.yml b/.github/workflows/slack-notifications.yml index 7d6479f32a..bf8544e6b1 100644 --- a/.github/workflows/slack-notifications.yml +++ b/.github/workflows/slack-notifications.yml @@ -31,13 +31,13 @@ jobs: prepare: name: Prepare notifications runs-on: ubuntu-latest - if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event.workflow_run.conclusion != 'skipped' && github.event_name != 'pull_request' }} + if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event.workflow_run.conclusion != 'skipped' && github.event.workflow_run.event != 'pull_request' }} outputs: previous_conclusion: ${{ steps.previous-conclusion.outputs.previous_conclusion }} payload: ${{ steps.create-payload.outputs.payload }} steps: - - name: Get details about the workflow + - name: Get details about the previous workflow run id: previous-result uses: actions/github-script@a3e7071a34d7e1f219a8a4de9a5e0a34d1ee1293 # v4.0.2 with: