From 562677a6dc8623dfbbfb69ad170accb8444ed7ac Mon Sep 17 00:00:00 2001 From: Ilija Tovilo Date: Mon, 28 Oct 2024 17:18:05 +0100 Subject: [PATCH] [skip ci] Run all branches in nightly on Monday (GH-16625) See GH-16286. The objective is to identify failed builds in security branches semi-early. Previously, they would only be run when a fix was backported, which would almost always result in a red build. --- .github/nightly_matrix.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/nightly_matrix.php b/.github/nightly_matrix.php index 7bbbcc6e55992..d83f198133f76 100644 --- a/.github/nightly_matrix.php +++ b/.github/nightly_matrix.php @@ -154,7 +154,10 @@ function get_current_version(): array { $trigger = $argv[1] ?? 'schedule'; $attempt = (int) ($argv[2] ?? 1); -$discard_cache = ($trigger === 'schedule' && $attempt !== 1) || $trigger === 'workflow_dispatch'; +$monday = date('w', time()) === '1'; +$discard_cache = $monday + || ($trigger === 'schedule' && $attempt !== 1) + || $trigger === 'workflow_dispatch'; if ($discard_cache) { @unlink(get_branch_commit_cache_file_path()); }