Skip to content

initial commit

initial commit #1

name: Build Docker Images
matrix:
platform: ['x86_64', 'aarch64']
include:
- arch: "AMD64"
platform: "x86_64"
- arch: "ARM64"
platform: "aarch64"
jobs:
build:
name: build ((${{ matrix.platform}})
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up QEMU
if: ${{ env.RUNNER_ARCH }} != ${{ matrix.arch }}
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Login to Github packages
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
platforms: linux/amd64,linux/arm64
push: ${{ github.event_name != 'pull_request' }}
build-args: |
ARCH=${{ matrix.platform }}
tags: ${{ github.repository }}