Skip to content

Add GitHub Actions workflow for multi-arch Docker build #1

Add GitHub Actions workflow for multi-arch Docker build

Add GitHub Actions workflow for multi-arch Docker build #1

Workflow file for this run

---
name: Build and Push Multi-Arch Docker Image
on:
push:
branches:
- multi-arch-docker-build
pull_request:
branches:
- multi-arch-docker-build
env:
REGISTRY_IMAGE: mlenergy/zeus:master
jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
platform:
- linux/amd64
- linux/arm64
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Docker meta
id: meta
uses: docker/metadata-action@v5
with:
images: ${{ env.REGISTRY_IMAGE }}
- name: Build and push
uses: docker/build-push-action@v4
with:
context: .
platforms: ${{ matrix.platform }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}