Skip to content

Commit 9282863

Browse files
committed
Run nightly on single branch with workflow_dispatch and explicit branch
1 parent 60ca5a0 commit 9282863

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

.github/nightly_matrix.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,8 +106,9 @@ function get_windows_matrix_include(array $branches) {
106106
if ($discard_cache) {
107107
@unlink(get_branch_commit_cache_file_path());
108108
}
109+
$branch = $argv[3] ?? 'master';
109110

110-
$branches = get_branches();
111+
$branches = $branch === 'master' ? get_branches() : get_branch_matrix([$branch]);
111112
$matrix_include = get_matrix_include($branches);
112113
$windows_matrix_include = get_windows_matrix_include($branches);
113114

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ jobs:
3232
nightly-
3333
- name: Generate Matrix
3434
id: set-matrix
35-
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}"
35+
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.head_ref || github.ref_name }}"
3636
- name: Notify Slack
3737
if: failure()
3838
uses: ./.github/actions/notify-slack

0 commit comments

Comments
 (0)