Skip to content

Commit

Permalink
fix: docker fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
masnormen committed Nov 30, 2024
1 parent 5616969 commit 71da59b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion .github/workflows/build-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,13 @@ jobs:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build project
run: pnpm nx build ${{ env.IMAGE_NAME }}

- name: Build and Push Docker Image
run: |
IMAGE_TAG=$(git rev-parse --short HEAD)
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${IMAGE_TAG} -f apps/${{ env.IMAGE_NAME }}/Dockerfile .
docker build -t ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${IMAGE_TAG} -f apps/${{ env.IMAGE_NAME }}/Dockerfile dist/apps/${{ env.IMAGE_NAME }}
docker tag ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${IMAGE_TAG} ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest
docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:${IMAGE_TAG}
docker push ${{ secrets.DOCKERHUB_USERNAME }}/${{ env.IMAGE_NAME }}:latest

0 comments on commit 71da59b

Please sign in to comment.