File tree Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Expand file tree Collapse file tree 2 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ inputs:
1010 ecr_role_arn :
1111 description : " ECR Role ARN"
1212 required : true
13+ acr_password :
14+ description : " Aliyun Container Registry Login Password"
15+ required : false
1316 repo :
1417 description : " Docker Repo to push"
1518 required : true
@@ -20,6 +23,9 @@ outputs:
2023 ecr_repo :
2124 description : " AWS public ECR Repository"
2225 value : ${{ steps.registry.outputs.ecr }}
26+ acr_repo :
27+ description : " Aliyun public Repository"
28+ value : ${{ steps.registry.outputs.acr }}
2329
2430runs :
2531 using : " composite"
4551 username : ${{ inputs.dockerhub_user }}
4652 password : ${{ inputs.dockerhub_token }}
4753
54+ - name : Login to Aliyun Container Registry
55+ if : inputs.acr_password
56+ shell : bash
57+ run : |
58+ docker login --username ${{ inputs.dockerhub_user }} --password ${{ inputs.acr_password }} registry.cn-beijing.aliyuncs.com
59+
4860 - name : Output Registries
4961 shell : bash
5062 id : registry
5163 run : |
5264 echo "::set-output name=dockerhub::datafuselabs/${{ inputs.repo }}"
5365 echo "::set-output name=ecr::public.ecr.aws/i7g1w5q7/${{ inputs.repo }}"
66+ echo "::set-output name=acr::registry.cn-beijing.aliyuncs.com/datafuselabs/${{ inputs.repo }}"
Original file line number Diff line number Diff line change @@ -286,6 +286,7 @@ jobs:
286286 ecr_role_arn : ${{ secrets.ECR_ROLE_ARN }}
287287 dockerhub_user : ${{ secrets.DOCKERHUB_USERNAME }}
288288 dockerhub_token : ${{ secrets.DOCKERHUB_TOKEN }}
289+ acr_password : ${{ secrets.ACR_PASSWORD }}
289290
290291 - name : Download binaries for usage
291292 id : download_binaries
@@ -308,11 +309,14 @@ jobs:
308309 run : |
309310 _tags="${{ steps.login.outputs.dockerhub_repo }}:${{ needs.create_release.outputs.version }}-${{ matrix.distro }}"
310311 _tags="${_tags},${{ steps.login.outputs.ecr_repo }}:${{ needs.create_release.outputs.version }}-${{ matrix.distro }}"
312+ _tags="${_tags},${{ steps.login.outputs.acr_repo }}:${{ needs.create_release.outputs.version }}-${{ matrix.distro }}"
311313 if [[ "${{ matrix.distro }}" == "debian" ]]; then
312314 _tags="${_tags},${{ steps.login.outputs.dockerhub_repo }}:${{ needs.create_release.outputs.version }}"
313315 _tags="${_tags},${{ steps.login.outputs.ecr_repo }}:${{ needs.create_release.outputs.version }}"
316+ _tags="${_tags},${{ steps.login.outputs.acr_repo }}:${{ needs.create_release.outputs.version }}"
314317 _tags="${_tags},${{ steps.login.outputs.dockerhub_repo }}:latest"
315318 _tags="${_tags},${{ steps.login.outputs.ecr_repo }}:latest"
319+ _tags="${_tags},${{ steps.login.outputs.acr_repo }}:latest"
316320 fi
317321 echo ::set-output name=IMAGE_TAGS::${_tags}
318322
You can’t perform that action at this time.
0 commit comments