@@ -3,11 +3,18 @@ name: "Configure multistage docker images (multi -flavours, -versions, -architec
33
44on :
55 workflow_call :
6-
76 # ##
87 # ## Input Variables
98 # ##
109 inputs :
10+ versions :
11+ description : ' The JSON string for versions. ( list of objects: [{NAME, VERSION[], ARCH[]}] )'
12+ required : true
13+ type : string
14+ refs :
15+ description : ' The JSON string for refs. ( object: {BRANCH, NUM_LATEST_TAGS} )'
16+ required : true
17+ type : string
1118 enabled :
1219 description : ' Determines whether this workflow is enabled at all (will run or skip).'
1320 required : true
2027 description : " Usage for a scheduled job? Only then we will evaluate git refs and add them to build matrix."
2128 required : true
2229 type : boolean
23- versions :
24- description : ' The JSON string for versions. ( list of objects: [{NAME, VERSION[], ARCH[]}] )'
25- required : true
26- type : string
27- refs :
28- description : ' The JSON string for refs. ( object: {BRANCH, NUM_LATEST_TAGS} )'
29- required : true
30- type : string
3130
3231 # ##
3332 # ## Input Secrets
4645 outputs :
4746 # Repeat input variables
4847 versions :
49- description : " Copied from inputs: The JSON string for versions."
48+ description : " (string) Copied from inputs: The JSON string for versions."
5049 value : ${{ jobs.configure.outputs.versions }}
5150 refs :
52- description : " Copied from inputs: The JSON string for refs."
51+ description : " (string) Copied from inputs: The JSON string for refs."
5352 value : ${{ jobs.configure.outputs.refs }}
5453 # Determined settings (flags)
5554 can_login :
56- description : " Can we login to Dockerhub?"
55+ description : " (boolean) Can we login to Dockerhub?"
5756 value : ${{ jobs.configure.outputs.can_login }}
5857 can_push :
59- description : " Can we push to Dockerhub?"
58+ description : " (boolean) Can we push to Dockerhub?"
6059 value : ${{ jobs.configure.outputs.can_push }}
6160 has_refs :
62- description : " Do we have refs? (used for nightly builds)"
61+ description : " (boolean) Do we have refs? (used for nightly builds)"
6362 value : ${{ jobs.configure.outputs.has_refs }}
6463 # Determined settings (values)
6564 matrix_build :
66- description : " The determined build matrix"
65+ description : " (string) The determined JSON string build matrix. "
6766 value : ${{ jobs.configure.outputs.matrix_build }}
6867 matrix_deploy :
69- description : " The determined deploy matrix"
68+ description : " (string) The determined JSON string deploy matrix. "
7069 value : ${{ jobs.configure.outputs.matrix_deploy }}
7170 artifact_prefix :
72- description : " The determined unique artifact prefix"
71+ description : " (string) The determined unique artifact prefix. "
7372 value : ${{ jobs.configure.outputs.artifact_prefix }}
7473
7574jobs :
@@ -115,9 +114,9 @@ jobs:
115114 shell : bash
116115 run : |
117116 if [ "${{ env.ENV_USER }}" = '' ] || [ "${{ env.ENV_PASS }}" = '' ]; then
118- echo "::set-output name=can_login::0 "
117+ echo "::set-output name=can_login::false "
119118 else
120- echo "::set-output name=can_login::1 "
119+ echo "::set-output name=can_login::true "
121120 fi
122121 env :
123122 ENV_USER : ${{ secrets.dockerhub_username }}
@@ -130,10 +129,10 @@ jobs:
130129 id : set-push
131130 shell : bash
132131 run : |
133- if [ "${{ steps.set-login.outputs.can_login }}" = "1 " ] && [ "${{ inputs.can_deploy }}" = "1 " ]; then
134- echo "::set-output name=can_push::1 "
132+ if [ "${{ steps.set-login.outputs.can_login }}" = "true " ] && [ "${{ inputs.can_deploy }}" = "true " ]; then
133+ echo "::set-output name=can_push::true "
135134 else
136- echo "::set-output name=can_push::0 "
135+ echo "::set-output name=can_push::false "
137136 fi
138137
139138 # ##
@@ -155,7 +154,7 @@ jobs:
155154
156155 - name : " [Set-Output] has_refs and matrix (ref-matrix) (branches and latest tags)"
157156 id : set-refs
158- uses : cytopia/git-ref-matrix-action@v0.1.8
157+ uses : cytopia/git-ref-matrix-action@v0.1.9
159158 with :
160159 repository_default_branch : ${{ steps.eval-refs.outputs.default_branch }}
161160 branches : ${{ steps.eval-refs.outputs.branches }}
@@ -186,7 +185,7 @@ jobs:
186185 id : set-matrix
187186 shell : bash
188187 run : |
189- if [ "${{ steps.set-refs.outputs.has_refs }}" = "1 " ]; then
188+ if [ "${{ steps.set-refs.outputs.has_refs }}" = "true " ]; then
190189 MATRIX_BUILD="$( \
191190 jq -M -c \
192191 --argjson refs '${{ steps.set-refs.outputs.matrix }}' \
0 commit comments