Skip to content

Commit 47863c5

Browse files
committed
Fix dpeloy
1 parent c3ef762 commit 47863c5

1 file changed

Lines changed: 33 additions & 55 deletions

File tree

.github/workflows/params.yml

Lines changed: 33 additions & 55 deletions
Original file line numberDiff line numberDiff line change
@@ -11,30 +11,28 @@ name: params
1111
# -------------------------------------------------------------------------------------------------
1212
env:
1313
NAME: MySQL
14-
MATRIX_VERSION: >-
14+
MATRIX: >-
1515
[
16-
{"NAME": "mysql", "VERSION": "5.5"},
17-
{"NAME": "mysql", "VERSION": "5.6"},
18-
{"NAME": "mysql", "VERSION": "5.7"},
19-
{"NAME": "mysql", "VERSION": "5.8"},
20-
{"NAME": "mariadb", "VERSION": "5.5"},
21-
{"NAME": "mariadb", "VERSION": "10.0"},
22-
{"NAME": "mariadb", "VERSION": "10.1"},
23-
{"NAME": "mariadb", "VERSION": "10.2"},
24-
{"NAME": "mariadb", "VERSION": "10.3"},
25-
{"NAME": "mariadb", "VERSION": "10.4"},
26-
{"NAME": "mariadb", "VERSION": "10.5"},
27-
{"NAME": "mariadb", "VERSION": "10.6"},
28-
{"NAME": "mariadb", "VERSION": "10.0"},
29-
{"NAME": "percona", "VERSION": "5.5"},
30-
{"NAME": "percona", "VERSION": "5.6"},
31-
{"NAME": "percona", "VERSION": "5.7"},
32-
{"NAME": "percona", "VERSION": "8.0"}
33-
]
34-
MATRIX_ARCH: >-
35-
[
36-
"linux/amd64",
37-
"linux/arm64"
16+
{
17+
"NAME": "mysql",
18+
"VERSION": ["5.5", "5.6", "5.7"],
19+
"ARCH": ["linux/amd64"]
20+
},
21+
{
22+
"NAME": "mysql",
23+
"VERSION": ["8.0"],
24+
"ARCH": ["linux/amd64", "linux/arm64"]
25+
},
26+
{
27+
"NAME": "mariadb",
28+
"VERSION": ["5.5", "10.0", "10.1", "10.2", "10.3", "10.4", "10.5", "10.6"],
29+
"ARCH": ["linux/amd64", "linux/arm64"]
30+
},
31+
{
32+
"NAME": "percona",
33+
"VERSION": ["5.5", "5.6", "5.7", "8.0"],
34+
"ARCH": ["linux/amd64"]
35+
}
3836
]
3937
4038
@@ -47,50 +45,35 @@ on:
4745
name:
4846
description: "The project name"
4947
value: ${{ jobs.params.outputs.name }}
50-
matrix_version:
48+
matrix:
5149
description: "The determined version matrix"
52-
value: ${{ jobs.params.outputs.matrix_version }}
53-
matrix_arch:
54-
description: "The determined architecture matrix"
55-
value: ${{ jobs.params.outputs.matrix_arch }}
56-
matrix_refs:
50+
value: ${{ jobs.params.outputs.matrix }}
51+
refs:
5752
description: "The determined git ref matrix (only during scheduled run)"
58-
value: ${{ jobs.params.outputs.matrix_refs }}
53+
value: ${{ jobs.params.outputs.refs }}
5954

6055
jobs:
6156
params:
6257
runs-on: ubuntu-latest
6358

6459
outputs:
6560
name: ${{ steps.set-name.outputs.name }}
66-
matrix_version: ${{ steps.set-matrix-version.outputs.matrix }}
67-
matrix_arch: ${{ steps.set-matrix-arch.outputs.matrix }}
68-
matrix_refs: ${{ steps.set-matrix-refs.outputs.matrix }}
61+
matrix: ${{ steps.set-matrix.outputs.matrix }}
62+
refs: ${{ steps.set-refs.outputs.matrix }}
6963

7064
steps:
71-
- name: Test JSON
72-
run: |
73-
jq -M -c \
74-
--argjson arches '${{ env.MATRIX_ARCH }}' \
75-
'map({NAME:.NAME, VERSION, ARCH:$arches[]})' <<<'${{ env.MATRIX_VERSION }}'
76-
7765
- name: "Set Name"
7866
id: set-name
7967
run: |
8068
echo '::set-output name=name::${{ env.NAME }}'
8169
82-
- name: "[Set-Output] Matrix 'Version'"
83-
id: set-matrix-version
70+
- name: "[Set-Output] Matrix"
71+
id: set-matrix
8472
run: |
85-
echo "::set-output name=matrix::$( echo '${{ env.MATRIX_VERSION }}' | jq -M -c )"
86-
87-
- name: "[Set-Output] Matrix 'Arch'"
88-
id: set-matrix-arch
89-
run: |
90-
echo "::set-output name=matrix::$( echo '${{ env.MATRIX_ARCH }}' | jq -M -c )"
73+
echo "::set-output name=matrix::$( echo '${{ env.MATRIX }}' | jq -M -c )"
9174
9275
- name: "[Set-Output] Matrix 'Refs' (master branch and latest tag)"
93-
id: set-matrix-refs
76+
id: set-refs
9477
uses: cytopia/git-ref-matrix-action@v0.1.2
9578
with:
9679
repository_default_branch: master
@@ -105,14 +88,9 @@ jobs:
10588
echo '${{ steps.set-name.outputs.name }}'
10689
echo
10790
108-
echo 'Matrix: Version'
109-
echo '--------------------'
110-
echo '${{ steps.set-matrix-version.outputs.matrix }}'
111-
echo
112-
113-
echo 'Matrix: Arch'
91+
echo 'Matrix'
11492
echo '--------------------'
115-
echo '${{ steps.set-matrix-arch.outputs.matrix }}'
93+
echo '${{ steps.set-matrix.outputs.matrix }}'
11694
echo
11795
11896
echo 'Matrix: Refs'

0 commit comments

Comments
 (0)