diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 971daa2..581a98c 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -2,9 +2,9 @@ name: Build and Publish Docker Images on: push: - paths: - - frontend/** - - backend/** + # paths: + # - frontend/** + # - backend/** branches: - master - dev @@ -44,8 +44,7 @@ jobs: echo "Unknown branch: ${{ github.ref_name }}" exit 1 fi - echo "branch_tag=${{ env.tag }}" >> $GITHUB_ENV - + - name: Build and push frontend Docker image to GHCR uses: docker/build-push-action@v3 with: @@ -55,7 +54,7 @@ jobs: COMMIT_HASH=${{ env.hash }} push: true tags: | - ghcr.io/loudbooks/pastebook-frontend:${{ env.branch_tag }} + ghcr.io/loudbooks/pastebook-frontend:${{ env.tag }} ghcr.io/loudbooks/pastebook-frontend:${{ env.hash }} - name: Build and push backend Docker image to GHCR @@ -65,7 +64,7 @@ jobs: file: ./backend/Dockerfile push: true tags: | - ghcr.io/loudbooks/pastebook-backend:${{ env.branch_tag }} + ghcr.io/loudbooks/pastebook-backend:${{ env.tag }} ghcr.io/loudbooks/pastebook-backend:${{ env.hash }} - name: Log in to Docker Hub @@ -83,7 +82,7 @@ jobs: file: ./frontend/Dockerfile push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/pastebook-frontend:${{ env.branch_tag }} + ${{ secrets.DOCKER_USERNAME }}/pastebook-frontend:${{ env.tag }} ${{ secrets.DOCKER_USERNAME }}/pastebook-frontend:${{ env.hash }} - name: Build and push backend Docker image to Docker Hub @@ -93,5 +92,5 @@ jobs: file: ./backend/Dockerfile push: true tags: | - ${{ secrets.DOCKER_USERNAME }}/pastebook-backend:${{ env.branch_tag }} + ${{ secrets.DOCKER_USERNAME }}/pastebook-backend:${{ env.tag }} ${{ secrets.DOCKER_USERNAME }}/pastebook-backend:${{ env.hash }}