From e6266b3b89aa1c502d1ba031bfe7d804e331409f Mon Sep 17 00:00:00 2001 From: Loudbook Date: Fri, 6 Dec 2024 14:10:27 -0500 Subject: [PATCH] Update build-and-deploy.yml --- .github/workflows/build-and-deploy.yml | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 3fa83e2..cff9fa9 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -77,9 +77,13 @@ jobs: uses: docker/build-push-action@v3 with: context: ./frontend + build-args: | + COMMIT_HASH=${{ env.hash }} file: ./frontend/Dockerfile push: true - tags: ${{ secrets.DOCKER_USERNAME }}/pastebook-frontend:latest + tags: | + ${{ secrets.DOCKER_USERNAME }}/pastebook-frontend:latest + ${{ secrets.DOCKER_USERNAME }}/pastebook-frontend:${{ env.hash }} - name: Build and push backend Docker image to Docker Hub uses: docker/build-push-action@v3 @@ -87,4 +91,6 @@ jobs: context: ./backend file: ./backend/Dockerfile push: true - tags: ${{ secrets.DOCKER_USERNAME }}/pastebook-backend:latest + tags: | + ${{ secrets.DOCKER_USERNAME }}/pastebook-backend:latest + ${{ secrets.DOCKER_USERNAME }}/pastebook-backend:${{ env.hash }}