feat(image-build): use Docker buildx, publish multi arch images
This commit is contained in:
parent
ae3fc5f802
commit
66f1e19ce8
|
@ -17,6 +17,8 @@ jobs:
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@v2
|
uses: docker/setup-buildx-action@v2
|
||||||
|
with:
|
||||||
|
install: true
|
||||||
|
|
||||||
- name: Log in to DockerHub
|
- name: Log in to DockerHub
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
|
@ -32,15 +34,13 @@ jobs:
|
||||||
- name: Build and push Docker image
|
- name: Build and push Docker image
|
||||||
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
docker build -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:main .
|
docker buildx create --use
|
||||||
docker build -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:main .
|
docker buildx build --platform linux/amd64,linux/arm64 -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:main --push .
|
||||||
docker push itzcrazykns1337/perplexica-backend:main
|
docker buildx build --platform linux/amd64,linux/arm64 -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:main --push .
|
||||||
docker push itzcrazykns1337/perplexica-frontend:main
|
|
||||||
|
|
||||||
- name: Build and push release Docker image
|
- name: Build and push release Docker image
|
||||||
if: github.event_name == 'release'
|
if: github.event_name == 'release'
|
||||||
run: |
|
run: |
|
||||||
docker build -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }} .
|
docker buildx create --use
|
||||||
docker build -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }} .
|
docker buildx build --platform linux/amd64,linux/arm64 -f backend.dockerfile -t itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }} --push .
|
||||||
docker push itzcrazykns1337/perplexica-backend:${{ env.RELEASE_VERSION }}
|
docker buildx build --platform linux/amd64,linux/arm64 -f app.dockerfile -t itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }} --push .
|
||||||
docker push itzcrazykns1337/perplexica-frontend:${{ env.RELEASE_VERSION }}
|
|
Loading…
Reference in New Issue