From 69b9ecc54e2b2e1724f10d17dfd681aa8aee8810 Mon Sep 17 00:00:00 2001 From: Jonathan Desrosiers Date: Wed, 31 Aug 2022 14:29:22 +0000 Subject: [PATCH] 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 --- .github/workflows/coding-standards.yml | 2 +- .github/workflows/end-to-end-tests.yml | 2 +- .github/workflows/javascript-tests.yml | 2 +- .github/workflows/php-compatibility.yml | 2 +- .github/workflows/phpunit-tests.yml | 2 +- .github/workflows/test-coverage.yml | 2 +- .github/workflows/test-npm.yml | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/coding-standards.yml b/.github/workflows/coding-standards.yml index 5b475a90f1..04fe086d63 100644 --- a/.github/workflows/coding-standards.yml +++ b/.github/workflows/coding-standards.yml @@ -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' diff --git a/.github/workflows/end-to-end-tests.yml b/.github/workflows/end-to-end-tests.yml index 5deda46f72..c9e030c5be 100644 --- a/.github/workflows/end-to-end-tests.yml +++ b/.github/workflows/end-to-end-tests.yml @@ -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' ) diff --git a/.github/workflows/javascript-tests.yml b/.github/workflows/javascript-tests.yml index ea4575822f..4f43b22ed7 100644 --- a/.github/workflows/javascript-tests.yml +++ b/.github/workflows/javascript-tests.yml @@ -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' ) diff --git a/.github/workflows/php-compatibility.yml b/.github/workflows/php-compatibility.yml index c2b5a2d6ac..509b39674b 100644 --- a/.github/workflows/php-compatibility.yml +++ b/.github/workflows/php-compatibility.yml @@ -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' ) diff --git a/.github/workflows/phpunit-tests.yml b/.github/workflows/phpunit-tests.yml index 7e2b3b294c..dd1d1351ac 100644 --- a/.github/workflows/phpunit-tests.yml +++ b/.github/workflows/phpunit-tests.yml @@ -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' ) diff --git a/.github/workflows/test-coverage.yml b/.github/workflows/test-coverage.yml index 9efb87e86c..15cb3625d7 100644 --- a/.github/workflows/test-coverage.yml +++ b/.github/workflows/test-coverage.yml @@ -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' ) diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index 78a1fe839f..1a86d54ccb 100644 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -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'