-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (32 loc) · 1.23 KB
/
matrix_prep.yml
File metadata and controls
38 lines (32 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: step.matrix_prepare
on:
workflow_call:
inputs:
target_subproject:
description: The subproject name of the specified Minecraft version for generating matrix entry
type: string
required: false
default: ''
outputs:
matrix:
description: The generated run matrix
value: ${{ jobs.matrix_prep.outputs.matrix }}
jobs:
matrix_prep:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Display context
run: |
echo ref_name = ${{ github.ref_name }}
echo target_subproject = ${{ github.event.inputs.target_subproject }}
echo target_release_tag = ${{ github.event.inputs.target_release_tag }}
- id: setmatrix
uses: JoshuaTheMiller/conditional-build-matrix@v2.0.1
with:
# inputFile: '.github/workflows/matrix_includes.json' # Default input file path
filter: '[? `${{ github.event_name }}` == `release` || `${{ github.event.inputs.target_subproject }}` == `` || `"${{ github.event.inputs.target_subproject }}"` == subproject_dir ]'
- name: Print matrix
run: echo ${{ steps.setmatrix.outputs.matrix }}
outputs:
matrix: ${{ steps.setmatrix.outputs.matrix }}