Skip to content

Fix ARM Focal Cross Compilation issues (#36) #220

Fix ARM Focal Cross Compilation issues (#36)

Fix ARM Focal Cross Compilation issues (#36) #220

Workflow file for this run

name: Docker Build
on:
pull_request:
push:
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker-build:
strategy:
matrix:
include:
- architecture: x64
ubuntu-codename: bionic
target: x64-version
- architecture: x64
ubuntu-codename: focal
target: x64-version
- architecture: armhf
ubuntu-codename: focal
target: cross-compile-version
- architecture: arm64
ubuntu-codename: focal
target: cross-compile-version
- architecture: x64
ubuntu-codename: jammy
target: x64-version
- architecture: armhf
ubuntu-codename: jammy
target: cross-compile-version
- architecture: arm64
ubuntu-codename: jammy
target: cross-compile-version
runs-on: ubuntu-latest
steps:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}-${{ matrix.architecture }}
flavor: |
latest=false
tags: |
type=schedule
type=ref,event=branch
type=ref,event=tag
type=ref,event=pr
# set latest tag for default branch
type=raw,value=${{ matrix.ubuntu-codename }},enable={{is_default_branch}}
- name: Build (default branch)
if: github.ref_name == github.event.repository.default_branch
uses: docker/build-push-action@v3
with:
push: true
build-args: |
BUILD_ARCHITECTURE=${{ matrix.architecture }}
UBUNTU_CODENAME=${{ matrix.ubuntu-codename }}
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Build
if: github.ref_name != github.event.repository.default_branch
uses: docker/build-push-action@v3
with:
push: true
build-args: |
BUILD_ARCHITECTURE=${{ matrix.architecture }}
UBUNTU_CODENAME=${{ matrix.ubuntu-codename }}
target: ${{ matrix.target }}
tags: ${{ steps.meta.outputs.tags }}-${{ matrix.ubuntu-codename }}
labels: ${{ steps.meta.outputs.labels }}