Skip to content

fix: build arm64 images #9

fix: build arm64 images

fix: build arm64 images #9

Workflow file for this run

name: Docker
on:
push:
branches:
- main
env:
REGISTRY: ghcr.io
IMAGE_NAME: ${{ github.repository }}
jobs:
docker-images:
name: Build and Push Docker Images
runs-on: ubuntu-latest
permissions:
pull-requests: write
contents: read
packages: write
steps:
- name: Checkout
uses: actions/checkout@v6
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log into registry ${{ env.REGISTRY }}
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract Docker metadata
id: meta
uses: docker/metadata-action@v5
with:
images: |
${{ env.REGISTRY }}/${{ env.IMAGE_NAME }}
flavor: |
latest=false
tags: |
type=sha
type=ref,event=pr
type=ref,event=branch
env:
DOCKER_METADATA_SHORT_SHA_LENGTH: 10
- name: Build ingress controller, debug tool and pre-stop hook (amd64)
run: make build ARCH=amd64
- name: Build ingress controller, debug tool and pre-stop hook (arm64)
run: make build ARCH=arm64
- name: Read NGINX_BASE
run: echo "NGINX_BASE=$(cat NGINX_BASE)" >> $GITHUB_ENV
- name: Build and Push
uses: docker/build-push-action@v6
with:
context: rootfs
push: ${{ github.ref == 'refs/heads/main' }}
sbom: true
provenance: true
labels: ${{ steps.meta.outputs.labels }}
tags: ${{ steps.meta.outputs.tags }}
platforms: linux/amd64,linux/arm64
cache-from: type=gha
cache-to: type=gha,mode=max
build-args: |
BASE_IMAGE=${{ env.NGINX_BASE }}
BUILD_ID=UNSET