mirror of
https://github.com/khoj-ai/khoj.git
synced 2024-12-19 10:57:45 +00:00
Use buildx to create multi platform docker image
This commit is contained in:
parent
ec797bc6b8
commit
59008ae90e
1 changed files with 7 additions and 4 deletions
11
.github/workflows/dockerize.yml
vendored
11
.github/workflows/dockerize.yml
vendored
|
@ -120,6 +120,9 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
steps:
|
steps:
|
||||||
|
- name: Set up Docker Buildx
|
||||||
|
uses: docker/setup-buildx-action@v3
|
||||||
|
|
||||||
- name: Login to GitHub Container Registry
|
- name: Login to GitHub Container Registry
|
||||||
uses: docker/login-action@v2
|
uses: docker/login-action@v2
|
||||||
with:
|
with:
|
||||||
|
@ -130,15 +133,15 @@ jobs:
|
||||||
- name: Create and Push Local Manifest
|
- name: Create and Push Local Manifest
|
||||||
if: github.event.inputs.khoj == 'true' || github.event_name == 'push'
|
if: github.event.inputs.khoj == 'true' || github.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
docker manifest create ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }} \
|
docker buildx imagetools create \
|
||||||
|
-t ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }} \
|
||||||
ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}-amd64 \
|
ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}-amd64 \
|
||||||
ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}-arm64
|
ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}-arm64
|
||||||
docker manifest push ghcr.io/${{ github.repository }}:${{ env.DOCKER_IMAGE_TAG }}
|
|
||||||
|
|
||||||
- name: Create and Push Cloud Manifest
|
- name: Create and Push Cloud Manifest
|
||||||
if: github.event.inputs.khoj-cloud == 'true' || github.event_name == 'push'
|
if: github.event.inputs.khoj-cloud == 'true' || github.event_name == 'push'
|
||||||
run: |
|
run: |
|
||||||
docker manifest create ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }} \
|
docker buildx imagetools create \
|
||||||
|
-t ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }} \
|
||||||
ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}-amd64 \
|
ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}-amd64 \
|
||||||
ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}-arm64
|
ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}-arm64
|
||||||
docker manifest push ghcr.io/${{ github.repository }}-cloud:${{ env.DOCKER_IMAGE_TAG }}
|
|
||||||
|
|
Loading…
Reference in a new issue