From 3850ddca39145ba8ae261f4cdee1f061f29677ae Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Thu, 19 Oct 2023 13:59:01 +0000 Subject: [PATCH] =?UTF-8?q?Build/Test=20Tools:=20Don=E2=80=99t=20run=20the?= =?UTF-8?q?=20performance=20workflow=20when=20branching.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. git-svn-id: https://develop.svn.wordpress.org/trunk@56972 602fd350-edb4-49c9-b593-d223f7449a82 --- .github/workflows/performance.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/performance.yml b/.github/workflows/performance.yml index 43b92e2cd7..6c2b5e1104 100644 --- a/.github/workflows/performance.yml +++ b/.github/workflows/performance.yml @@ -92,7 +92,7 @@ jobs: runs-on: ubuntu-latest permissions: contents: read - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( '00000000', github.event.before ) }} steps: - name: Configure environment variables