Skip to content

Compile AppFlowy Cloud with buildx #7

Compile AppFlowy Cloud with buildx

Compile AppFlowy Cloud with buildx #7

name: Compile AppFlowy Cloud with buildx
on:
workflow_dispatch:
inputs:
tag:
description: "AppFlowy Cloud tag"
required: true
type: string
permissions:
packages: write
jobs:
build-appflowy-cloud-container:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- platfom: linux/amd64
arch: amd64
- platfom: linux/arm64
arch: aarch64
steps:
- name: Checkout
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
with:
platforms: ${{ matrix.platform }}
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.repository_owner }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ghcr.io/${{ github.repository }}/appflowy_cloud_build-${{ matrix.arch }}
tags: ${{ inputs.tag }}
- name: Build and push
uses: docker/build-push-action@v5
with:
context: appflowy_cloud
file: appflowy_cloud/Dockerfile.build
push: true
build-args: |
BUILD_FROM=ghcr.io/home-assistant/${{ matrix.arch }}-base:3.19
BUILD_VERSION=${{ inputs.tag }}
platforms: ${{ matrix.platform }}
tags: ${{ steps.meta.outputs.tags }}