Skip to content

Commit 47e1738

Browse files
committed
Build/Test Tools: Prevent Dependabot workflow runs in other mirrors.
Currently, workflows are configured to only run for `wordpress-develop` or when pull requests are opened where forks and mirrors are the base repository. Because a Dependabot configuration is present in the repository, it cannot be turned off for mirrors. This results in workflows running for all Dependabot PRs, which is problematic for private mirrors and needlessly consumes minutes and resources. Props swissspidy, johnbillion. See #62221. git-svn-id: https://develop.svn.wordpress.org/trunk@60080 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 9cc4078 commit 47e1738

13 files changed

Lines changed: 27 additions & 27 deletions

.github/workflows/coding-standards.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,15 +52,15 @@ jobs:
5252
uses: ./.github/workflows/reusable-coding-standards-php.yml
5353
permissions:
5454
contents: read
55-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
55+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
5656

5757
# Runs the JavaScript coding standards checks.
5858
jshint:
5959
name: JavaScript coding standards
6060
uses: ./.github/workflows/reusable-coding-standards-javascript.yml
6161
permissions:
6262
contents: read
63-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
63+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
6464

6565
slack-notifications:
6666
name: Slack Notifications

.github/workflows/end-to-end-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ jobs:
5858
uses: ./.github/workflows/reusable-end-to-end-tests.yml
5959
permissions:
6060
contents: read
61-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
61+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
6262
strategy:
6363
fail-fast: false
6464
matrix:

.github/workflows/install-testing.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
permissions:
4848
contents: read
4949
secrets: inherit
50-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
50+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
5151
with:
5252
wp-version: ${{ inputs.wp-version }}
5353

@@ -63,7 +63,7 @@ jobs:
6363
permissions:
6464
contents: read
6565
runs-on: ${{ matrix.os }}
66-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
66+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
6767
timeout-minutes: 10
6868
needs: [ build-test-matrix ]
6969
strategy:

.github/workflows/javascript-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ jobs:
5353
uses: ./.github/workflows/reusable-javascript-tests.yml
5454
permissions:
5555
contents: read
56-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
56+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
5757

5858
slack-notifications:
5959
name: Slack Notifications

.github/workflows/local-docker-environment.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ jobs:
7373
permissions:
7474
contents: read
7575
secrets: inherit
76-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
76+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
7777
with:
7878
wp-version: ${{ github.event_name == 'pull_request' && github.base_ref || github.ref_name }}
7979

@@ -83,7 +83,6 @@ jobs:
8383
uses: ./.github/workflows/reusable-test-local-docker-environment-v1.yml
8484
permissions:
8585
contents: read
86-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
8786
needs: [ build-test-matrix ]
8887
strategy:
8988
fail-fast: false

.github/workflows/performance.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
determine-matrix:
5252
name: Determine Matrix
5353
runs-on: ubuntu-24.04
54-
if: ${{ ( github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' ) && ! contains( github.event.before, '00000000' ) }}
54+
if: ${{ ( github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) ) && ! contains( github.event.before, '00000000' ) }}
5555
permissions: {}
5656
env:
5757
TARGET_SHA: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.sha || github.event.before }}

.github/workflows/php-compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ jobs:
4747
uses: ./.github/workflows/reusable-php-compatibility.yml
4848
permissions:
4949
contents: read
50-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
50+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
5151

5252
slack-notifications:
5353
name: Slack Notifications

.github/workflows/phpunit-tests.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ jobs:
5959
permissions:
6060
contents: read
6161
secrets: inherit
62-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
62+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
6363
strategy:
6464
fail-fast: false
6565
matrix:
@@ -130,7 +130,7 @@ jobs:
130130
permissions:
131131
contents: read
132132
secrets: inherit
133-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
133+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
134134
strategy:
135135
fail-fast: false
136136
matrix:
@@ -180,7 +180,7 @@ jobs:
180180
permissions:
181181
contents: read
182182
secrets: inherit
183-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
183+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
184184
strategy:
185185
fail-fast: false
186186
matrix:
@@ -223,7 +223,7 @@ jobs:
223223
permissions:
224224
contents: read
225225
secrets: inherit
226-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
226+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
227227
strategy:
228228
fail-fast: false
229229
matrix:

.github/workflows/test-and-zip-default-themes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ jobs:
6363
permissions:
6464
contents: read
6565
timeout-minutes: 10
66-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
66+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
6767
strategy:
6868
fail-fast: false
6969
matrix:
@@ -113,7 +113,7 @@ jobs:
113113
permissions:
114114
contents: read
115115
timeout-minutes: 10
116-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
116+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
117117
strategy:
118118
fail-fast: false
119119
matrix:

.github/workflows/test-build-processes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ jobs:
5151
uses: ./.github/workflows/reusable-test-core-build-process.yml
5252
permissions:
5353
contents: read
54-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
54+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
5555
strategy:
5656
fail-fast: false
5757
matrix:
@@ -99,7 +99,7 @@ jobs:
9999
uses: ./.github/workflows/reusable-test-gutenberg-build-process.yml
100100
permissions:
101101
contents: read
102-
if: ${{ github.repository == 'WordPress/wordpress-develop' || github.event_name == 'pull_request' }}
102+
if: ${{ github.repository == 'WordPress/wordpress-develop' || ( github.event_name == 'pull_request' && github.actor != 'dependabot[bot]' ) }}
103103
strategy:
104104
fail-fast: false
105105
matrix:

0 commit comments

Comments
 (0)