diff --git a/.github/workflows/docker_build.yml b/.github/workflows/docker_build.yml index afdb7fd..0350662 100644 --- a/.github/workflows/docker_build.yml +++ b/.github/workflows/docker_build.yml @@ -32,8 +32,9 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} - labels: | - org.opencontainers.image.version=latest + tags: | + # set latest tag for master branch + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Set up QEMU uses: docker/setup-qemu-action@v3 - name: Set up Docker Buildx @@ -82,8 +83,9 @@ jobs: uses: docker/metadata-action@v5 with: images: ${{ env.REGISTRY_IMAGE }} - labels: | - org.opencontainers.image.version=latest + tags: | + # set latest tag for master branch + type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - name: Login to Docker Hub uses: docker/login-action@v3 with: