From 160b714e4c5f8e72759b6c5ee652dd6dd75f40e2 Mon Sep 17 00:00:00 2001
From: Nikola Marcetic <n.marcetic86@gmail.com>
Date: Thu, 28 Mar 2024 19:15:06 +0100
Subject: [PATCH] fix/github actions tags

Signed-off-by: Nikola Marcetic <n.marcetic86@gmail.com>
---
 .github/workflows/docker.yml | 10 +---------
 1 file changed, 1 insertion(+), 9 deletions(-)

diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 46eb5b4f..53a92c60 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -51,15 +51,7 @@ jobs:
       - name: Build image and push
         run: |
           cd peggo/
-          TAG=$(echo ${GITHUB_REF#refs/heads/} | cut -d '/' -f 2)
+          TAG=${{ github.ref_name }}
           echo $TAG
           [[ $ECR_ENABLED == "false" ]] || docker buildx build --tag $ECR_REPO:$TAG --platform linux/amd64,linux/arm64 --push .
           [[ $GHCR_ENABLED == "false" ]] || docker buildx build --tag $GHCR_REPO:$TAG --platform linux/amd64,linux/arm64 --push .
-
-      - name: NONROOT Build image and push
-        run: |
-          cd peggo/
-          TAG=$(echo ${GITHUB_REF#refs/heads/} | cut -d '/' -f 2)-nonroot
-          echo $TAG
-          [[ $ECR_ENABLED == "false" ]] || docker buildx build -f Dockerfile.nonroot --tag $ECR_REPO:$TAG --platform linux/amd64,linux/arm64 --push .
-          [[ $GHCR_ENABLED == "false" ]] || docker buildx build -f Dockerfile.nonroot --tag $GHCR_REPO:$TAG --platform linux/amd64,linux/arm64 --push .