-
Notifications
You must be signed in to change notification settings - Fork 9
88 lines (77 loc) · 2.8 KB
/
params.yml
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
---
# -------------------------------------------------------------------------------------------------
# Job Name
# -------------------------------------------------------------------------------------------------
name: params
# -------------------------------------------------------------------------------------------------
# Custom Variables
# -------------------------------------------------------------------------------------------------
env:
MATRIX: >-
[
{
"NAME": "ngrok",
"VERSION": ["2"],
"FLAVOUR": ["latest", "alpine"],
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6", "linux/ppc64le", "linux/s390x"]
},
{
"NAME": "ngrok",
"VERSION": ["2"],
"FLAVOUR": ["bookworm", "bullseye"],
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6", "linux/ppc64le", "linux/s390x", "linux/mips64le"]
},
{
"NAME": "ngrok",
"VERSION": ["2"],
"FLAVOUR": ["buster"],
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/ppc64le", "linux/s390x", "linux/mips64le"]
},
{
"NAME": "ngrok",
"VERSION": ["2"],
"FLAVOUR": ["stretch"],
"ARCH": ["linux/amd64", "linux/386", "linux/arm64", "linux/arm/v7", "linux/arm/v6"]
}
]
# -------------------------------------------------------------------------------------------------
# When to run
# -------------------------------------------------------------------------------------------------
on:
workflow_call:
outputs:
matrix:
description: "The determined version matrix"
value: ${{ jobs.params.outputs.matrix }}
refs:
description: "The determined git ref matrix (only during scheduled run)"
value: ${{ jobs.params.outputs.refs }}
jobs:
params:
runs-on: ubuntu-latest
outputs:
matrix: ${{ steps.set-matrix.outputs.matrix }}
refs: ${{ steps.set-refs.outputs.matrix }}
steps:
- name: "[Set-Output] Matrix"
id: set-matrix
run: |
echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )"
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)"
id: set-refs
uses: cytopia/[email protected]
with:
repository_default_branch: master
branches: master
num_latest_tags: 1
if: github.event_name == 'schedule'
- name: "[DEBUG] Show settings'"
run: |
echo 'Matrix'
echo '--------------------'
echo '${{ steps.set-matrix.outputs.matrix }}'
echo
echo 'Matrix: Refs'
echo '--------------------'
echo '${{ steps.set-matrix-refs.outputs.matrix }}'
echo