Skip to content

Commit

Permalink
feat(image-build): use Docker buildx, publish multi arch images
Browse files Browse the repository at this point in the history
  • Loading branch information
ItzCrazyKns committed Oct 3, 2024
1 parent ae3fc5f commit 66f1e19
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/docker-build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true

- name: Log in to DockerHub
uses: docker/login-action@v2
Expand All @@ -32,15 +34,13 @@ jobs:
- name: Build and push Docker image
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: |
docker build -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:main .
docker build -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:main .
docker push itzcrazykns1337/perplexica-backend:main
docker push itzcrazykns1337/perplexica-frontend:main
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:main --push .
docker buildx build --platform linux/amd64,linux/arm64 -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:main --push .
- name: Build and push release Docker image
if: github.event_name == 'release'
run: |
docker build -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }} .
docker build -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }} .
docker push itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }}
docker push itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }}
docker buildx create --use
docker buildx build --platform linux/amd64,linux/arm64 -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }} --push .
docker buildx build --platform linux/amd64,linux/arm64 -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }} --push .

0 comments on commit 66f1e19

Please sign in to comment.