diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 8c5e3257222bf..88e1281a1cba3 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -6,6 +6,7 @@ on: - trunk - '3.[7-9]' - '[4-9].[0-9]' + - feature/** tags: - '[0-9]+.[0-9]' - '[0-9]+.[0-9].[0-9]+' @@ -14,6 +15,7 @@ on: - trunk - '3.[7-9]' - '[4-9].[0-9]' + - feature/** workflow_dispatch: # Once weekly On Sundays at 00:00 UTC. schedule: @@ -40,7 +42,7 @@ jobs: permissions: contents: read secrets: inherit - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ( startsWith( github.base_ref, 'feature/' ) != true || vars.ALLOW_FEATURE_BRANCHES == 'true' ) }} strategy: fail-fast: false matrix: @@ -111,7 +113,7 @@ jobs: permissions: contents: read secrets: inherit - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ( startsWith( github.base_ref, 'feature/' ) != true || vars.ALLOW_FEATURE_BRANCHES == 'true' ) }} strategy: fail-fast: false matrix: @@ -161,7 +163,7 @@ jobs: permissions: contents: read secrets: inherit - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ( startsWith( github.base_ref, 'feature/' ) != true || vars.ALLOW_FEATURE_BRANCHES == 'true' ) }} strategy: fail-fast: false matrix: @@ -204,7 +206,7 @@ jobs: permissions: contents: read secrets: inherit - if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }} + if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ( startsWith( github.base_ref, 'feature/' ) != true || vars.ALLOW_FEATURE_BRANCHES == 'true' ) }} strategy: fail-fast: false matrix: