@@ -2,6 +2,9 @@ name: ci-cd-java.yml
22on :
33 workflow_call :
44
5+ env :
6+ IMAGE_NAME_MIXED_CASE : " ${{ github.repository }}"
7+
58jobs :
69 build-check-test-push :
710 name : Build, check, test, push
@@ -34,12 +37,16 @@ jobs:
3437 env :
3538 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
3639
40+ - name : Lowercase Docker Image Name
41+ run : |
42+ echo "IMAGE_NAME=${IMAGE_NAME_MIXED_CASE,,}" >> "${GITHUB_ENV}"
43+
3744 - name : Build Docker Image
3845 uses : docker/build-push-action@v6
3946 with :
4047 context : .
4148 push : ' false'
42- tags : ' hsldevcom/${{ github.repository }}:${{ github.sha }}'
49+ tags : ' hsldevcom/${{ env.IMAGE_NAME }}:${{ github.sha }}'
4350
4451 - name : Setup Docker Buildx
4552 if : github.ref == 'refs/heads/main' || github.ref == 'refs/heads/develop'
@@ -50,13 +57,13 @@ jobs:
5057 id : meta
5158 uses : docker/metadata-action@v5
5259 with :
53- images : ${{ github.repository }}
60+ images : ${{ env.IMAGE_NAME }}
5461 tags : |
5562 type=ref,event=branch
5663 type=sha
5764 type=semver,pattern={{version}}
5865 labels : |
59- org.opencontainers.image.title=${{ github.repository }}
66+ org.opencontainers.image.title=${{ env.IMAGE_NAME }}
6067 org.opencontainers.image.vendor=hsldevcom
6168
6269 - name : Login to Github Container Registry
0 commit comments