Make WordPress Core

Changeset 56972


Ignore:
Timestamp:
10/19/2023 01:59:01 PM (13 months ago)
Author:
desrosj
Message:

Build/Test Tools: Don’t run the performance workflow when branching.

When a branch is created, there is no previous commit to reference in the github.event.before context, which causes the performance workflow to fail because there is no previous commit to perform a comparison with.

This adds a condition to check that github.event.before is not set to 0000000000000000000000000000000000000000, which is the default value when there are no previous commits.

Props swissspidy.
See #588867.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/.github/workflows/performance.yml

    r56954 r56972  
    9393    permissions:
    9494      contents: read
    95     if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
     95    if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( '00000000', github.event.before ) }}
    9696
    9797    steps:
Note: See TracChangeset for help on using the changeset viewer.