diff --git a/.github/workflows/docker-build-push.yml b/.github/workflows/docker-build-push.yml index 80543701..62f06bbb 100644 --- a/.github/workflows/docker-build-push.yml +++ b/.github/workflows/docker-build-push.yml @@ -13,9 +13,9 @@ jobs: - name: Checkout the repository uses: actions/checkout@v3.0.0 - - id: slug - name: Get Short Commit SHA - run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + - id: version + name: Get Version + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - name: Login to Docker uses: docker/login-action@v1.14.1 @@ -31,7 +31,7 @@ jobs: file: client/Dockerfile tags: | amruthpillai/reactive-resume:client-latest - amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }} + amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} docker_server: name: Docker (Server) @@ -41,9 +41,9 @@ jobs: - name: Checkout the repository uses: actions/checkout@v3.0.0 - - id: slug - name: Get Short Commit SHA - run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + - id: version + name: Get Version + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - name: Login to Docker uses: docker/login-action@v1.14.1 @@ -59,7 +59,7 @@ jobs: file: server/Dockerfile tags: | amruthpillai/reactive-resume:server-latest - amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }} + amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }} github_client: name: GitHub (Client) @@ -69,9 +69,9 @@ jobs: - name: Checkout the repository uses: actions/checkout@v3.0.0 - - id: slug - name: Get Short Commit SHA - run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + - id: version + name: Get Version + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - name: Login to GitHub Container Registry uses: docker/login-action@v1.14.1 @@ -88,7 +88,7 @@ jobs: file: client/Dockerfile tags: | ghcr.io/amruthpillai/reactive-resume:client-latest - ghcr.io/amruthpillai/reactive-resume:client-${{ steps.slug.outputs.sha8 }} + ghcr.io/amruthpillai/reactive-resume:client-${{ steps.version.outputs.tag }} github_server: name: GitHub (Server) @@ -98,9 +98,9 @@ jobs: - name: Checkout the repository uses: actions/checkout@v3.0.0 - - id: slug - name: Get Short Commit SHA - run: echo "::set-output name=sha8::$(echo ${GITHUB_SHA} | cut -c1-8)" + - id: version + name: Get Version + run: echo ::set-output name=tag::${GITHUB_REF#refs/*/} - name: Login to GitHub Container Registry uses: docker/login-action@v1.14.1 @@ -117,4 +117,4 @@ jobs: file: server/Dockerfile tags: | ghcr.io/amruthpillai/reactive-resume:server-latest - ghcr.io/amruthpillai/reactive-resume:server-${{ steps.slug.outputs.sha8 }} + ghcr.io/amruthpillai/reactive-resume:server-${{ steps.version.outputs.tag }}