Skip to content

Commit 7a14ba6

Browse files
committed
more for PRs
1 parent 2e0c162 commit 7a14ba6

File tree

2 files changed

+20
-0
lines changed

2 files changed

+20
-0
lines changed

.github/workflows/check-build.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,25 @@ name: Build
5050
run-name: Build - ${{ github.event_name }}
5151

5252
jobs:
53+
setup:
54+
runs-on: ubuntu-latest
55+
outputs:
56+
build_matrix: ${{ format('{0}{1}', steps.build_matrix_v1.outputs.build_matrix, steps.build_matrix_v1.outputs.build_matrix) }}
57+
steps:
58+
- id: base
59+
name: Base
60+
run: |
61+
echo build_version=$(test ${{ github.base_ref }} == "v2" && echo "v2" || echo "v1") >> $GITHUB_OUTPUT
62+
- id: build_matrix_v1
63+
name: Build matrix (v1)
64+
if: ${{ steps.base.outputs.build_version == 'v1' }}
65+
run: |
66+
echo build_matrix='["8", "11", "17", "21"]' >> "$GITHUB_OUTPUT"
67+
- id: build_matrix_v2
68+
name: Build matrix (v2)
69+
if: ${{ steps.base.outputs.build_version == 'v2' }}
70+
run: |
71+
echo build_matrix='["11", "17", "21"]'>> "$GITHUB_OUTPUT"
5372
build:
5473
runs-on: ubuntu-latest
5574
strategy:

.github/workflows/release.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ jobs:
4040
runs-on: ubuntu-latest
4141
outputs:
4242
version: ${{ format('{0}{1}', steps.version_release.outputs.version, steps.version_snapshot.outputs.version) }}
43+
build_matrix: ${{ format('{0}{1}', steps.build_matrix_v1.outputs.build_matrix, steps.build_matrix_v1.outputs.build_matrix) }}
4344
steps:
4445
- id: version_snapshot
4546
if: ${{ inputs.snapshot }}

0 commit comments

Comments
 (0)