Skip to content

Commit 5f6cac4

Browse files
committed
Feedback
1 parent 1240f09 commit 5f6cac4

File tree

3 files changed

+16
-8
lines changed

3 files changed

+16
-8
lines changed

.github/nightly_matrix.php

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,15 @@ function select_jobs($trigger, $labels, $php_version, $ref, $all_variations) {
165165
$branch['config']['ubuntu_version'] = version_compare($php_version, '8.5', '>=') ? '24.04' : '22.04';
166166
}
167167

168-
$f = fopen(getenv('GITHUB_OUTPUT'), 'a');
169-
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
170-
fwrite($f, 'all_variations=' . json_encode($all_variations, JSON_UNESCAPED_SLASHES) . "\n");
171-
fclose($f);
168+
echo "All variations:";
169+
echo json_encode($all_variations, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
170+
echo "\n\nBranches:\n";
171+
echo json_encode($branches, JSON_UNESCAPED_SLASHES|JSON_PRETTY_PRINT);
172+
echo "\n";
173+
174+
if (false !== ($github_output = getenv('GITHUB_OUTPUT'))) {
175+
$f = fopen($github_output, 'a');
176+
fwrite($f, 'branches=' . json_encode($branches, JSON_UNESCAPED_SLASHES) . "\n");
177+
fwrite($f, 'all_variations=' . json_encode($all_variations, JSON_UNESCAPED_SLASHES) . "\n");
178+
fclose($f);
179+
}

.github/workflows/push.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,14 +45,14 @@ jobs:
4545
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.ref }}" '${{ toJSON(github.event.pull_request.labels) }}'
4646
PUSH:
4747
needs: GENERATE_MATRIX
48-
name: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches)[0].ref }}
48+
name: ${{ matrix.branch.ref }}
4949
uses: ./.github/workflows/nightly.yml
5050
strategy:
5151
fail-fast: false
5252
matrix:
5353
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
5454
with:
55-
all_variations: ${{ needs.GENERATE_MATRIX.outputs.all_variations == 'true' && true || false }}
55+
all_variations: ${{ needs.GENERATE_MATRIX.outputs.all_variations == 'true' }}
5656
branch: ${{ toJSON(matrix.branch) }}
5757
secrets: inherit
5858
BENCHMARKING:

.github/workflows/root.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ jobs:
3131
nightly-
3232
- name: Generate Matrix
3333
id: set-matrix
34-
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.ref }}"
34+
run: php .github/nightly_matrix.php "${{ github.event_name }}" "${{ github.run_attempt }}" "${{ github.ref }}" '[]'
3535
NIGHTLY:
3636
needs: GENERATE_MATRIX
3737
name: ${{ matrix.branch.ref }}
@@ -42,6 +42,6 @@ jobs:
4242
matrix:
4343
branch: ${{ fromJson(needs.GENERATE_MATRIX.outputs.branches) }}
4444
with:
45-
all_variations: ${{ needs.GENERATE_MATRIX.outputs.all_variations == 'true' && true || false }}
45+
all_variations: ${{ needs.GENERATE_MATRIX.outputs.all_variations == 'true' }}
4646
branch: ${{ toJSON(matrix.branch) }}
4747
secrets: inherit

0 commit comments

Comments
 (0)