Skip to content

Commit 69b9ecc

Browse files
committed
Build/Test Tools: Correct the context variable being used when auto-retrying failed and cancelled workflows.
The correct variable here is `github.run_attempt`, which represents the unique number for each attempt of a particular workflow run in a repository. The `github.run_number` currently being used represents the unique number for each run of a particular workflow in a repository. Follow up to [53947]. Fixes #56407. git-svn-id: https://develop.svn.wordpress.org/trunk@54039 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 843c27e commit 69b9ecc

7 files changed

Lines changed: 7 additions & 7 deletions

File tree

.github/workflows/coding-standards.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ jobs:
182182
always() &&
183183
github.repository == 'WordPress/wordpress-develop' &&
184184
github.event_name != 'pull_request' &&
185-
github.run_number < 2 &&
185+
github.run_attempt < 2 &&
186186
(
187187
needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' ||
188188
needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ jobs:
139139
always() &&
140140
github.repository == 'WordPress/wordpress-develop' &&
141141
github.event_name != 'pull_request' &&
142-
github.run_number < 2 &&
142+
github.run_attempt < 2 &&
143143
(
144144
needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
145145
)

.github/workflows/javascript-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
always() &&
108108
github.repository == 'WordPress/wordpress-develop' &&
109109
github.event_name != 'pull_request' &&
110-
github.run_number < 2 &&
110+
github.run_attempt < 2 &&
111111
(
112112
needs.test-js.result == 'cancelled' || needs.test-js.result == 'failure'
113113
)

.github/workflows/php-compatibility.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
always() &&
124124
github.repository == 'WordPress/wordpress-develop' &&
125125
github.event_name != 'pull_request' &&
126-
github.run_number < 2 &&
126+
github.run_attempt < 2 &&
127127
(
128128
needs.php-compatibility.result == 'cancelled' || needs.php-compatibility.result == 'failure'
129129
)

.github/workflows/phpunit-tests.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -255,7 +255,7 @@ jobs:
255255
always() &&
256256
github.repository == 'WordPress/wordpress-develop' &&
257257
github.event_name != 'pull_request' &&
258-
github.run_number < 2 &&
258+
github.run_attempt < 2 &&
259259
(
260260
needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure'
261261
)

.github/workflows/test-coverage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ jobs:
202202
always() &&
203203
github.repository == 'WordPress/wordpress-develop' &&
204204
github.event_name != 'pull_request' &&
205-
github.run_number < 2 &&
205+
github.run_attempt < 2 &&
206206
(
207207
needs.test-coverage-report.result == 'cancelled' || needs.test-coverage-report.result == 'failure'
208208
)

.github/workflows/test-npm.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ jobs:
180180
always() &&
181181
github.repository == 'WordPress/wordpress-develop' &&
182182
github.event_name != 'pull_request' &&
183-
github.run_number < 2 &&
183+
github.run_attempt < 2 &&
184184
(
185185
needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' ||
186186
needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'

0 commit comments

Comments
 (0)