mirror of
https://github.com/hatchet-dev/hatchet.git
synced 2026-04-29 22:19:56 -05:00
feat: arm64 builds for hatchet-lite (#566)
This commit is contained in:
@@ -41,13 +41,56 @@ jobs:
|
||||
- name: Build migrate
|
||||
run: docker build -f ./build/package/migrate.dockerfile .
|
||||
|
||||
lite:
|
||||
lite-arm:
|
||||
runs-on: hatchet-arm64-2
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build lite
|
||||
run: |
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
--build-arg SERVER_TARGET=lite \
|
||||
--platform linux/arm64 \
|
||||
-t hatchet-lite-tmp:arm64 \
|
||||
. &
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
--build-arg SERVER_TARGET=admin \
|
||||
--platform linux/arm64 \
|
||||
-t hatchet-admin-tmp:arm64 \
|
||||
. &
|
||||
|
||||
wait
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \
|
||||
--build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:arm64 \
|
||||
--build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:arm64 \
|
||||
--platform linux/arm64 \
|
||||
.
|
||||
|
||||
lite-amd:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Clone repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Build lite
|
||||
run: |
|
||||
docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=lite -t hatchet-lite-tmp
|
||||
docker build -f ./build/package/servers.dockerfile . --build-arg SERVER_TARGET=admin -t hatchet-admin-tmp
|
||||
docker build -f ./build/package/lite.dockerfile . --build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp --build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
--build-arg SERVER_TARGET=lite \
|
||||
--platform linux/amd64 \
|
||||
-t hatchet-lite-tmp:amd64 \
|
||||
. &
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
--build-arg SERVER_TARGET=admin \
|
||||
--platform linux/amd64 \
|
||||
-t hatchet-admin-tmp:amd64 \
|
||||
. &
|
||||
|
||||
wait
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \
|
||||
--build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:amd64 \
|
||||
--build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \
|
||||
--platform linux/amd64 \
|
||||
.
|
||||
|
||||
@@ -120,7 +120,7 @@ jobs:
|
||||
- name: Push to GHCR
|
||||
run: |
|
||||
docker push ghcr.io/hatchet-dev/hatchet/hatchet-frontend:${{steps.tag_name.outputs.tag}}
|
||||
build-push-hatchet-lite:
|
||||
build-push-hatchet-lite-amd:
|
||||
name: hatchet-lite
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
@@ -134,25 +134,102 @@ jobs:
|
||||
- name: Login to GHCR
|
||||
id: login-ghcr
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build
|
||||
run: |
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
-t hatchet-lite-local:${{steps.tag_name.outputs.tag}} \
|
||||
--build-arg SERVER_TARGET=lite \
|
||||
--build-arg VERSION=${{steps.tag_name.outputs.tag}} \
|
||||
.
|
||||
--platform linux/amd64 \
|
||||
-t hatchet-lite-tmp:amd64 \
|
||||
. &
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
-t hatchet-admin-local:${{steps.tag_name.outputs.tag}} \
|
||||
--build-arg SERVER_TARGET=admin \
|
||||
--build-arg VERSION=${{steps.tag_name.outputs.tag}} \
|
||||
.
|
||||
--platform linux/amd64 \
|
||||
-t hatchet-admin-tmp:amd64 \
|
||||
. &
|
||||
|
||||
wait
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \
|
||||
-t ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}} \
|
||||
--build-arg HATCHET_LITE_IMAGE=hatchet-lite-local:${{steps.tag_name.outputs.tag}} \
|
||||
--build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-local:${{steps.tag_name.outputs.tag}} \
|
||||
-t ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 \
|
||||
--platform linux/arm64,linux/amd64 \
|
||||
--build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:amd64 \
|
||||
--build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:amd64 \
|
||||
.
|
||||
- name: Push to GHCR
|
||||
run: |
|
||||
docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}
|
||||
docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64
|
||||
build-push-hatchet-lite-arm:
|
||||
name: hatchet-lite
|
||||
runs-on: hatchet-arm64-2
|
||||
steps:
|
||||
- name: Get tag name
|
||||
id: tag_name
|
||||
run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TAG: ${{ github.ref }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to GHCR
|
||||
id: login-ghcr
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
- name: Set up QEMU
|
||||
uses: docker/setup-qemu-action@v3
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v3
|
||||
- name: Build
|
||||
run: |
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
--build-arg SERVER_TARGET=lite \
|
||||
--platform linux/arm64 \
|
||||
-t hatchet-lite-tmp:arm64 \
|
||||
. &
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/servers.dockerfile \
|
||||
--build-arg SERVER_TARGET=admin \
|
||||
--platform linux/arm64 \
|
||||
-t hatchet-admin-tmp:arm64 \
|
||||
. &
|
||||
|
||||
wait
|
||||
|
||||
DOCKER_BUILDKIT=1 docker build -f ./build/package/lite.dockerfile \
|
||||
-t ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64 \
|
||||
--platform linux/arm64,linux/amd64 \
|
||||
--build-arg HATCHET_LITE_IMAGE=hatchet-lite-tmp:arm64 \
|
||||
--build-arg HATCHET_ADMIN_IMAGE=hatchet-admin-tmp:arm64 \
|
||||
.
|
||||
- name: Push to GHCR
|
||||
run: |
|
||||
docker push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64
|
||||
combine-hatchet-lite:
|
||||
name: Combine hatchet-lite
|
||||
runs-on: ubuntu-latest
|
||||
needs:
|
||||
- build-push-hatchet-lite-amd
|
||||
- build-push-hatchet-lite-arm
|
||||
steps:
|
||||
- name: Get tag name
|
||||
id: tag_name
|
||||
run: echo "tag=${GITHUB_TAG/refs\/tags\//}" >> $GITHUB_OUTPUT
|
||||
env:
|
||||
GITHUB_TAG: ${{ github.ref }}
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
- name: Login to GHCR
|
||||
id: login-ghcr
|
||||
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
|
||||
- name: Pull amd64
|
||||
run: docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64
|
||||
- name: Pull arm64
|
||||
run: docker pull ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64
|
||||
- name: Combine
|
||||
run: |
|
||||
docker manifest create ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}} \
|
||||
ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-amd64 \
|
||||
ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}-arm64
|
||||
docker manifest push ghcr.io/hatchet-dev/hatchet/hatchet-lite:${{steps.tag_name.outputs.tag}}
|
||||
|
||||
Reference in New Issue
Block a user