Make WordPress Core

Changeset 51555


Ignore:
Timestamp:
08/05/2021 02:36:17 PM (4 years ago)
Author:
desrosj
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/slack-notifications.yml

    r51536 r51555  
    3232    name: Prepare notifications
    3333    runs-on: ubuntu-latest
    34     if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event.workflow_run.conclusion != 'skipped' && github.event_name != 'pull_request' }}
     34    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event.workflow_run.conclusion != 'skipped' && github.event.workflow_run.event != 'pull_request' }}
    3535    outputs:
    3636      previous_conclusion: ${{ steps.previous-conclusion.outputs.previous_conclusion }}
     
    3838
    3939    steps:
    40       - name: Get details about the workflow
     40      - name: Get details about the previous workflow run
    4141        id: previous-result
    4242        uses: actions/github-script@a3e7071a34d7e1f219a8a4de9a5e0a34d1ee1293 # v4.0.2
Note: See TracChangeset for help on using the changeset viewer.