Skip to content

Commit

Permalink
Update docker.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
21chanas3 authored Oct 3, 2024
1 parent 86f8e5d commit 222319b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 222319b

Please sign in to comment.