Skip to content

armgit / kaneo

Public Imported from GitHub
0

⚡ Project management that doesn't become the project. Boards, Gantt charts, and GitHub integration. Self-host it or use Kaneo Cloud.

feat: adding multi platform build

Andrej9e407089a09f
diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml
index 61c6ab16b..84ae18e27 100644
--- a/.github/workflows/docker.yml
+++ b/.github/workflows/docker.yml
@@ -1,17 +1,17 @@
name: Build & publish images to GHCR
on:
+ workflow_dispatch:
push:
branches:
- main
paths:
- - 'apps/**'
- - 'packages/**'
+ - 'apps/**'
+ - 'packages/**'
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
- TARGET_PLATFORMS: linux/amd64,linux/arm64
jobs:
build-and-push-image:
@@ -30,18 +30,24 @@ jobs:
steps:
- name: Checkout repository
- uses: actions/checkout@v3
+ uses: actions/checkout@v4
+
+ - name: Set up QEMU
+ uses: docker/setup-qemu-action@v3
+
+ - name: Set up Docker Buildx
+ uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
- uses: docker/login-action@v2
+ uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GH_PACKAGE_TOKEN }}
- - name: Extract metadata (tags, labels) for Docker
+ - name: Extract metadata
id: meta
- uses: docker/metadata-action@v4
+ uses: docker/metadata-action@v5
with:
images: ${{ matrix.image }}
tags: |
@@ -50,12 +56,14 @@ jobs:
type=sha
type=raw,value=latest
- - name: Build and push Docker image
- uses: docker/build-push-action@v4
+ - name: Build and push
+ uses: docker/build-push-action@v5
with:
context: .
file: ${{ matrix.dockerfile }}
+ platforms: linux/amd64,linux/arm64
push: true
tags: ${{ steps.meta.outputs.tags }}
- platforms: ${{ env.TARGET_PLATFORMS }}
labels: ${{ steps.meta.outputs.labels }}
+ cache-from: type=gha
+ cache-to: type=gha,mode=max