From 668d39fa8733541411bd238ad8b52ea17bad19c6 Mon Sep 17 00:00:00 2001 From: Amruth Pillai Date: Mon, 22 Aug 2022 09:17:32 +0200 Subject: [PATCH] change tagname of docker image --- .github/workflows/docker-build.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index 604b5d56..fbb26dab 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -1,4 +1,4 @@ -name: Build and Push Docker Image +name: Build Docker Image on: pull_request @@ -18,6 +18,10 @@ jobs: with: fetch-depth: 2 + - id: vars + name: Get Short SHA + run: echo "::set-output name=sha_short::$(git rev-parse --short HEAD)" + - name: Set up QEMU uses: docker/setup-qemu-action@v2.0.0 @@ -40,9 +44,9 @@ jobs: platforms: linux/amd64,linux/arm64 tags: | amruthpillai/reactive-resume:client-latest - amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} + amruthpillai/reactive-resume:client-${{ steps.vars.outputs.sha_short }} ghcr.io/amruthpillai/reactive-resume:client-latest - ghcr.io/amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} + ghcr.io/amruthpillai/reactive-resume:client-${{ steps.vars.outputs.sha_short }} server: name: Server @@ -81,6 +85,6 @@ jobs: platforms: linux/amd64,linux/arm64 tags: | amruthpillai/reactive-resume:server-latest - amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }} + amruthpillai/reactive-resume:server-${{ steps.vars.outputs.sha_short }} ghcr.io/amruthpillai/reactive-resume:server-latest - ghcr.io/amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }} + ghcr.io/amruthpillai/reactive-resume:server-${{ steps.vars.outputs.sha_short }}