Skip to content

Commit

Permalink
Update build-and-deploy.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Loudbooks authored Dec 10, 2024
1 parent 8d8ac71 commit 5c29738
Showing 1 changed file with 4 additions and 11 deletions.
15 changes: 4 additions & 11 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ jobs:
echo "Unknown branch: ${{ github.ref_name }}"
exit 1
fi
echo "branch_tag=${{ env.tag }}" >> $GITHUB_ENV
- name: Debug Branch and Tags
run: |
echo "Branch name: ${{ github.ref_name }}"
echo "Tag: ${{ env.tag }}"
echo "Branch tag: ${{ env.branch_tag }}"
- name: Build and push frontend Docker image to GHCR
uses: docker/build-push-action@v3
Expand All @@ -61,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
Expand All @@ -71,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
Expand All @@ -89,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
Expand All @@ -99,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 }}

0 comments on commit 5c29738

Please sign in to comment.