fix: docker image build repo name
All checks were successful
container-scan / Container Scan (pull_request) Successful in 1m41s
docker-build / docker (pull_request) Successful in 4m21s

This commit is contained in:
Dominik 2025-04-17 00:05:28 +02:00
parent a7e94e9673
commit 6be739857c
Signed by: dominik
GPG key ID: 06A4003FC5049644

View file

@ -36,23 +36,34 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Get the Ref
id: get-ref
uses: https://github.com/ankitvgupta/ref-to-tag-action@master
with:
ref: ${{ github.ref }}
head_ref: ${{ github.head_ref }}
- name: lowercase repo name
run: |
echo "REPO=${GITHUB_REPOSITORY,,}" >>${GITHUB_ENV}
- name: Build and push (pull_request)
uses: docker/build-push-action@v6
if: github.event_name == 'pull_request'
with:
push: true
tags: ${{ github.repository }}:sha_${{ github.sha }},${{ github.repository }}:pr_${{ github.head_ref }}
tags: git.dominikstahl.dev/${{ env.REPO }}:sha_${{ github.sha }},git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag}}
- name: Build and push (push_tag)
uses: docker/build-push-action@v6
if: github.event_name == 'push' && github.ref_type == 'tag'
with:
push: true
tags: ${{ github.repository }}:${{ github.ref_name }},${{ github.repository }}:latest
tags: git.dominikstahl.dev/${{ env.REPO }}:${{ steps.get-ref.outputs.tag }},git.dominikstahl.dev/${{ env.REPO }}:latest
- name: Build and push (push_branch)
uses: docker/build-push-action@v6
if: github.event_name == 'push' && github.ref_type == 'branch'
with:
push: true
tags: ${{ github.repository }}:sha_${{ github.sha }},${{ github.repository }}:main
tags: git.dominikstahl.dev/${{ env.REPO }}:sha_${{ github.sha }},git.dominikstahl.dev/${{ env.REPO }}:main