From 10ed67c753a421c61ead5f1dc6c75be838eb9ed5 Mon Sep 17 00:00:00 2001 From: ItzCrazyKns <95534749+ItzCrazyKns@users.noreply.github.com> Date: Mon, 6 Oct 2025 20:00:31 +0530 Subject: [PATCH] feat(workflow): build images for canary --- .github/workflows/docker-build.yaml | 36 +++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/.github/workflows/docker-build.yaml b/.github/workflows/docker-build.yaml index 29f7987..6b9e2e2 100644 --- a/.github/workflows/docker-build.yaml +++ b/.github/workflows/docker-build.yaml @@ -4,6 +4,7 @@ on: push: branches: - master + - canary release: types: [published] @@ -43,6 +44,19 @@ jobs: -t itzcrazykns1337/${IMAGE_NAME}:amd64 \ --push . + - name: Build and push AMD64 Canary Docker image + if: github.ref == 'refs/heads/canary' && github.event_name == 'push' + run: | + DOCKERFILE=app.dockerfile + IMAGE_NAME=perplexica + docker buildx build --platform linux/amd64 \ + --cache-from=type=registry,ref=itzcrazykns1337/${IMAGE_NAME}:canary-amd64 \ + --cache-to=type=inline \ + --provenance false \ + -f $DOCKERFILE \ + -t itzcrazykns1337/${IMAGE_NAME}:canary-amd64 \ + --push . + - name: Build and push AMD64 release Docker image if: github.event_name == 'release' run: | @@ -91,6 +105,19 @@ jobs: -t itzcrazykns1337/${IMAGE_NAME}:arm64 \ --push . + - name: Build and push ARM64 Canary Docker image + if: github.ref == 'refs/heads/canary' && github.event_name == 'push' + run: | + DOCKERFILE=app.dockerfile + IMAGE_NAME=perplexica + docker buildx build --platform linux/arm64 \ + --cache-from=type=registry,ref=itzcrazykns1337/${IMAGE_NAME}:canary-arm64 \ + --cache-to=type=inline \ + --provenance false \ + -f $DOCKERFILE \ + -t itzcrazykns1337/${IMAGE_NAME}:canary-arm64 \ + --push . + - name: Build and push ARM64 release Docker image if: github.event_name == 'release' run: | @@ -128,6 +155,15 @@ jobs: --amend itzcrazykns1337/${IMAGE_NAME}:arm64 docker manifest push itzcrazykns1337/${IMAGE_NAME}:main + - name: Create and push multi-arch manifest for canary + if: github.ref == 'refs/heads/canary' && github.event_name == 'push' + run: | + IMAGE_NAME=perplexica + docker manifest create itzcrazykns1337/${IMAGE_NAME}:canary \ + --amend itzcrazykns1337/${IMAGE_NAME}:canary-amd64 \ + --amend itzcrazykns1337/${IMAGE_NAME}:canary-arm64 + docker manifest push itzcrazykns1337/${IMAGE_NAME}:canary + - name: Create and push multi-arch manifest for releases if: github.event_name == 'release' run: |