Make WordPress Core


Ignore:
Timestamp:
10/24/2023 02:12:06 PM (2 years ago)
Author:
desrosj
Message:

Build/Test Tools: Simplify some logic in GitHub Action workflows.

This simplifies the logic within the slack-notifications and failed-workflow steps in GitHub Action workflows to use the contains() function and object filtering.

This makes it simpler to perform the needed checks by removing the need to list out every single dependent job defined in needs.

Merges [56660] to the 6.4 branch.
See #58867.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/6.4/.github/workflows/performance.yml

    r56954 r57000  
    270270    if: ${{ github.repository == 'WordPress/wordpress-develop' && github.event_name != 'pull_request' && always() }}
    271271    with:
    272       calling_status: ${{ contains( needs.*.result, 'cancelled' ) && 'cancelled' || contains( needs.*.result, 'failure' ) && 'failure' || 'success' }}
     272      calling_status: ${{ needs.performance.result == 'success' && 'success' || needs.performance.result == 'cancelled' && 'cancelled' || 'failure' }}
    273273    secrets:
    274274      SLACK_GHA_SUCCESS_WEBHOOK: ${{ secrets.SLACK_GHA_SUCCESS_WEBHOOK }}
     
    289289      github.run_attempt < 2 &&
    290290      (
    291         contains( needs.*.result, 'cancelled' ) ||
    292         contains( needs.*.result, 'failure' )
     291        needs.performance.result == 'cancelled' || needs.performance.result == 'failure'
    293292      )
    294293
Note: See TracChangeset for help on using the changeset viewer.