add tag only

This commit is contained in:
Adrien Beaudouin 2024-08-14 17:20:24 +02:00
parent c601b96fd2
commit d21cc5e7ae

View File

@ -12,16 +12,19 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }} if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
steps: steps:
- uses: https://gitea.okami101.io/okami101/actions/docker@main - uses: docker/metadata-action@v5
id: meta
with:
images: ${{ vars.CONTAINER_REGISTRY }}/${{ gitea.repository }}
- uses: docker/login-action@v3
with: with:
registry: ${{ vars.CONTAINER_REGISTRY }} registry: ${{ vars.CONTAINER_REGISTRY }}
username: test username: ${{ vars.CONTAINER_REGISTRY_USERNAME }}
password: test password: ${{ secrets.password }}
- name: Push tags - name: Push tags
shell: bash shell: bash
if: ${{ startsWith(gitea.ref, 'refs/tags/v') }}
env: env:
DOCKER_IMAGE: ${{ inputs.registry }}/${{ gitea.repository }} DOCKER_IMAGE: ${{ vars.CONTAINER_REGISTRY }}/${{ gitea.repository }}
run: | run: |
docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:latest docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:latest
docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:${{ steps.meta.outputs.version }} docker tag $DOCKER_IMAGE:main $DOCKER_IMAGE:${{ steps.meta.outputs.version }}