From 652ca5424a9ba4d60c4a8c199493129f4aba5b92 Mon Sep 17 00:00:00 2001 From: Thales Macedo Garitezi Date: Wed, 23 Oct 2024 13:18:07 -0300 Subject: [PATCH] ci: add version to docker tags --- .github/workflows/docker.yaml | 33 ++++++++++++++++++++++----------- 1 file changed, 22 insertions(+), 11 deletions(-) diff --git a/.github/workflows/docker.yaml b/.github/workflows/docker.yaml index e61d953..3447d91 100644 --- a/.github/workflows/docker.yaml +++ b/.github/workflows/docker.yaml @@ -16,16 +16,27 @@ jobs: steps: - uses: actions/checkout@v3 - - uses: docker/setup-buildx-action@v2 - - uses: docker/setup-qemu-action@v2 - - uses: docker/login-action@v2 + - name: Docker Metadata action + uses: docker/metadata-action@v5.5.1 with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ github.token }} + images: | + ghcr.io/${{ github.repository }} + tags: | + type=ref,event=branch + type=ref,event=pr + type=semver,pattern={{version}} - - uses: docker/build-push-action@v3 - with: - push: true - platforms: linux/amd64,linux/arm64 - tags: ghcr.io/${{ github.repository }} + # - uses: docker/setup-buildx-action@v2 + # - uses: docker/setup-qemu-action@v2 + # - uses: docker/login-action@v2 + # with: + # registry: ghcr.io + # username: ${{ github.actor }} + # password: ${{ github.token }} + + # - name: Build and push Docker images + # uses: docker/build-push-action@v6.9.0 + # with: + # push: true + # platforms: linux/amd64,linux/arm64 + # tags: ghcr.io/${{ github.repository }}