From 222319b5609f3ec01f24be5e1ca923609679be08 Mon Sep 17 00:00:00 2001 From: Aden Chan <40689649+21chanas3@users.noreply.github.com> Date: Thu, 3 Oct 2024 13:20:26 -0700 Subject: [PATCH] Update docker.yml --- .github/workflows/docker.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 5a57aa9..d3fad21 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -24,13 +24,13 @@ jobs: password: ${{ secrets.DOCKER_HUB_PASSWORD }} - name: Build Docker image - run: docker build -t ${{ secrets.DOCKER_HUB_USER }}/$IMAGE_NAME:${{ github.sha }} . + run: docker build -t ${{ secrets.DOCKER_HUB_USER }}/${{ env.IMAGE_NAME }}:${{ github.sha }} . - name: Tag Docker image as latest - run: docker tag ${{ secrets.DOCKER_HUB_USER }}/$IMAGE_NAME:${{ github.sha }} ${{ secrets.DOCKER_HUB_USER }}/$IMAGE_NAME:latest + run: docker tag ${{ secrets.DOCKER_HUB_USER }}/${{ env.IMAGE_NAME }}:${{ github.sha }} ${{ secrets.DOCKER_HUB_USER }}/${{ env.IMAGE_NAME }}:latest - name: Push Docker image to Docker Hub with commit SHA tag - run: docker push ${{ secrets.DOCKER_HUB_USER }}/$IMAGE_NAME:${{ github.sha }} + run: docker push ${{ secrets.DOCKER_HUB_USER }}/${{ env.IMAGE_NAME }}:${{ github.sha }} - name: Push Docker image to Docker Hub with latest tag - run: docker push ${{ secrets.DOCKER_HUB_USER }}/$IMAGE_NAME:latest + run: docker push ${{ secrets.DOCKER_HUB_USER }}/${{ env.IMAGE_NAME }}:latest