[TASK] Add arm64 platform build

This commit is contained in:
Nick DiZazzo 2025-05-03 21:47:57 -04:00
parent 70f3557670
commit c1d450d9db
No known key found for this signature in database
GPG Key ID: 5C13A728DE885B3F

View File

@ -7,11 +7,11 @@ name: Docker
on: on:
push: push:
branches: [ master ] branches: [master]
# Publish semver tags as releases. # Publish semver tags as releases.
tags: [ 'v*.*.*' ] tags: ["v*.*.*"]
pull_request: pull_request:
branches: [ master ] branches: [master]
env: env:
# Use docker.io for Docker Hub if empty # Use docker.io for Docker Hub if empty
@ -19,10 +19,8 @@ env:
# github.repository as <account>/<repo> # github.repository as <account>/<repo>
IMAGE_NAME: ${{ github.repository }} IMAGE_NAME: ${{ github.repository }}
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
permissions: permissions:
contents: read contents: read
@ -35,18 +33,20 @@ jobs:
- name: Checkout repository - name: Checkout repository
uses: actions/checkout@v2 uses: actions/checkout@v2
# Required to build arm64 image
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
# Install the cosign tool (not used on PR, still installed) # Install the cosign tool (not used on PR, still installed)
# https://github.com/sigstore/cosign-installer # https://github.com/sigstore/cosign-installer
- name: Install cosign - name: Install cosign
uses: sigstore/cosign-installer@main uses: sigstore/cosign-installer@main
with: with:
cosign-release: 'v2.2.3' cosign-release: "v2.2.3"
- name: Check cosign version - name: Check cosign version
run: cosign version run: cosign version
# Workaround: https://github.com/docker/build-push-action/issues/461 # Workaround: https://github.com/docker/build-push-action/issues/461
- name: Setup Docker buildx - name: Setup Docker buildx
uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf uses: docker/setup-buildx-action@79abd3f86f79a9d68a23c75a09a9a85889262adf
@ -82,6 +82,7 @@ jobs:
push: ${{ github.event_name != 'pull_request' }} push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }} tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }} labels: ${{ steps.meta.outputs.labels }}
platforms: linux/amd64,linux/arm64
# Sign the resulting Docker image digest except on PRs. # Sign the resulting Docker image digest except on PRs.
# This will only write to the public Rekor transparency log when the Docker # This will only write to the public Rekor transparency log when the Docker