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
This commit is contained in:
Jonathan Desrosiers 2022-08-31 14:29:22 +00:00
parent 843c27e6f9
commit 69b9ecc54e
7 changed files with 7 additions and 7 deletions

View File

@ -182,7 +182,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.phpcs.result == 'cancelled' || needs.phpcs.result == 'failure' ||
needs.jshint.result == 'cancelled' || needs.jshint.result == 'failure'

View File

@ -139,7 +139,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.e2e-tests.result == 'cancelled' || needs.e2e-tests.result == 'failure'
)

View File

@ -107,7 +107,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.test-js.result == 'cancelled' || needs.test-js.result == 'failure'
)

View File

@ -123,7 +123,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.php-compatibility.result == 'cancelled' || needs.php-compatibility.result == 'failure'
)

View File

@ -255,7 +255,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.test-php.result == 'cancelled' || needs.test-php.result == 'failure'
)

View File

@ -202,7 +202,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.test-coverage-report.result == 'cancelled' || needs.test-coverage-report.result == 'failure'
)

View File

@ -180,7 +180,7 @@ jobs:
always() &&
github.repository == 'WordPress/wordpress-develop' &&
github.event_name != 'pull_request' &&
github.run_number < 2 &&
github.run_attempt < 2 &&
(
needs.test-npm.result == 'cancelled' || needs.test-npm.result == 'failure' ||
needs.test-npm-macos.result == 'cancelled' || needs.test-npm-macos.result == 'failure'