add tag only

This commit is contained in:
2024-08-14 16:56:45 +02:00
parent 40d8ef8731
commit a80595f1cb
3 changed files with 40 additions and 10 deletions

View File

@ -25,18 +25,8 @@ runs:
username: ${{ inputs.username }}
password: ${{ inputs.password }}
- uses: docker/build-push-action@v6
if: ${{ !startsWith(gitea.ref, 'refs/tags/v') }}
with:
context: .
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Push tags
shell: bash
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
env:
DOCKER_IMAGE: ${{ inputs.registry }}/${{ gitea.repository }}
run: |
docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:latest
docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:${{ steps.meta.outputs.version }}
docker push -a $DOCKER_IMAGE