From 22571b603b613ef104fa8e3555a151e066fc8b90 Mon Sep 17 00:00:00 2001
From: Darren Kelly <darren.kelly@vechain.org>
Date: Wed, 13 Mar 2024 14:07:14 +0000
Subject: [PATCH] fix: publish latest with tag

---
 .github/workflows/push-docker-image.yml | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/.github/workflows/push-docker-image.yml b/.github/workflows/push-docker-image.yml
index dc76542..e5dcb23 100644
--- a/.github/workflows/push-docker-image.yml
+++ b/.github/workflows/push-docker-image.yml
@@ -28,7 +28,9 @@ jobs:
         id: meta
         uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
         with:
-          images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref }}
+          images: |
+            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:${{ github.ref }}
+            ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}:latest
 
       - name: Build and push Docker image
         uses: docker/build-push-action@f2a1d5e99d037542a71f64918e516c093c6f3fc4
@@ -36,5 +38,5 @@ jobs:
           context: .
           file: ./Dockerfile
           push: true
-          tags: ${{ github.ref }}
+          tags: ${{ steps.meta.outputs.tags }}
           labels: ${{ steps.meta.outputs.labels }}