@@ -105,6 +105,7 @@ jobs:
105105 const result = {
106106 flavors,
107107 components: flattenedComponents,
108+ customers: Object.keys(config.customers).join(','),
108109 };
109110 console.log(result);
110111 return result;
@@ -232,7 +233,7 @@ jobs:
232233 exit 1 #exit execution due to docker image vulnerabilities
233234 fi
234235
235- post-build :
236+ retag-images :
236237 name : Retag images of flavor ${{ matrix.flavor || 'default' }}
237238 needs : [get-flavors, build-flavors]
238239 strategy :
@@ -288,3 +289,22 @@ jobs:
288289 - name : Log out from Amazon ECR
289290 shell : bash
290291 run : docker logout ${{ steps.login-ecr.outputs.registry }}
292+
293+ push-to-customers :
294+ name : Push images to customers
295+ # if? When should we do this? Always? Only for certain branches? If so, how should we define that, in the config.json?
296+ needs : [retag-images, get-flavors]
297+ runs-on : ${{ inputs.runs_on || 'ubuntu-22.04' }}
298+ steps :
299+ - name : Checkout github-workflows repository
300+ uses : actions/checkout@v4
301+ with :
302+ repository : datavisyn/github-workflows
303+ ref : ${{ env.WORKFLOW_BRANCH }}
304+ path : ./tmp/github-workflows
305+ - name : Trigger push docker artifacts to ${{ fromJson(needs.get-flavors.outputs.result).customers }}
306+ uses : ./tmp/github-workflows/.github/workflows/build-docker-artifacts-trigger-push-to-customer
307+ with :
308+ customers : ${{ fromJson(needs.get-flavors.outputs.result).customers }}
309+ branch : ${{ inputs.branch }}
310+ runs_on : ${{ inputs.runs_on || 'ubuntu-22.04' }}
0 commit comments