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
This commit is contained in:
Jonathan Desrosiers
2021-08-05 14:36:17 +00:00
parent 87da9620ad
commit 69b661f687

View File

@@ -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: