diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index c2fd740703bac..64a0d7930d239 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -47,7 +47,14 @@ jobs: uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-php.yml@trunk 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' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ) + ) with: php-version: '7.3' old-branch: true @@ -58,7 +65,14 @@ jobs: uses: WordPress/wordpress-develop/.github/workflows/reusable-coding-standards-javascript.yml@trunk 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' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ) + ) slack-notifications: name: Slack Notifications diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index 06c9a749ca3ff..001223dc153cb 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -45,7 +45,14 @@ jobs: uses: WordPress/wordpress-develop/.github/workflows/reusable-javascript-tests.yml@trunk 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' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ) + ) with: disable-apparmor: true diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index c4ba4b7ba1f59..824557cf7d2a4 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -35,7 +35,14 @@ 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' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ) + ) strategy: fail-fast: false matrix: diff --git a/.github/workflows/test-build-processes.yml b/.github/workflows/test-build-processes.yml index bd1527c0a7326..adab529c06306 100644 --- a/.github/workflows/test-build-processes.yml +++ b/.github/workflows/test-build-processes.yml @@ -41,7 +41,14 @@ jobs: uses: WordPress/wordpress-develop/.github/workflows/reusable-test-core-build-process.yml@trunk 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' && ( + ! github.event.repository.private || + ! github.event.pull_request.draft || + contains( github.event.pull_request.labels.*.name, 'Draft Workflow Runs' ) + ) + ) strategy: fail-fast: false matrix: