Skip to content

Commit

Permalink
Refactor auto-deploy workflow to build, tag, and push frontend and ba…
Browse files Browse the repository at this point in the history
…ckend Docker images in a single step
  • Loading branch information
zayman2045 committed Jan 6, 2025
1 parent 1241cee commit de40b78
Showing 1 changed file with 4 additions and 14 deletions.
18 changes: 4 additions & 14 deletions .github/workflows/auto-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,10 @@ jobs:
with:
registry-type: public

- name: Build frontend Docker image
- name: Build, tag, and push frontend Docker image
run: |
docker buildx build --platform linux/amd64 -t portfolio-frontend-1 frontend --load
docker buildx build --platform linux/amd64 -t $FRONTEND_IMAGE --push frontend
- name: List Docker images
run: docker images

- name: Tag and push frontend Docker image
run: |
docker tag portfolio-frontend-1:latest $FRONTEND_IMAGE
docker push $FRONTEND_IMAGE
- name: Build and push backend Docker image
- name: Build, tag, and push backend Docker image
run: |
docker buildx build --platform linux/amd64 -t portfolio-backend-1 backend --load
docker tag portfolio-backend-1:latest $BACKEND_IMAGE
docker push $BACKEND_IMAGE
docker buildx build --platform linux/amd64 -t $BACKEND_IMAGE --push backend

0 comments on commit de40b78

Please sign in to comment.