2323 echo "ACTOR=${GITHUB_ACTOR@L}" >> ${GITHUB_ENV}
2424 echo "REPO_NAME=${GITHUB_REPOSITORY#$GITHUB_REPOSITORY_OWNER/}" >> $GITHUB_ENV
2525 shell : bash
26- - name : Login to Docker Hub
27- if : ${{ inputs.dockerhub }} == true
28- uses : docker/login-action@v3
29- with :
30- username : ${{ inputs.dockerhub_username }}
31- password : ${{ inputs.dockerhub_token }}
3226 - name : Login to GitHub Container Registry
3327 uses : docker/login-action@v3
3428 with :
@@ -40,34 +34,12 @@ runs:
4034 - name : Set up Docker Buildx
4135 uses : docker/setup-buildx-action@v3
4236 - name : Docker meta
43- if : ${{ inputs.dockerhub }}
44- id : meta_with_dockerhub
45- uses : docker/metadata-action@v5
46- with :
47- images : |
48- ${{ inputs.dockerhub_username }}/${{ env.REPO_NAME }}
49- ghcr.io/${{ github.repository }}
50- tags : type=semver,pattern={{version}},suffix=-${{ inputs.base_tag }}
51- - name : Build and push
52- if : ${{ inputs.dockerhub }}
53- uses : docker/build-push-action@v5
54- with :
55- provenance : false
56- platforms : linux/amd64
57- file : setup_utils/docker/Dockerfile
58- build-args : BASE_TAG=${{ inputs.base_tag }}
59- push : true
60- tags : ${{ steps.meta_with_dockerhub.outputs.tags }}
61- labels : ${{ steps.meta_with_dockerhub.outputs.labels }}
62- - name : Docker meta
63- if : ${{ inputs.dockerhub }} == false
6437 id : meta
6538 uses : docker/metadata-action@v5
6639 with :
6740 images : ghcr.io/${{ github.repository }}
6841 tags : type=semver,pattern={{version}},suffix=-${{ inputs.base_tag }}
6942 - name : Build and push
70- if : ${{ inputs.dockerhub }} == false
7143 uses : docker/build-push-action@v5
7244 with :
7345 provenance : false
0 commit comments