ci: Build Docker for `arm64` arch

- Trivial upgrades:
  - docker/build-push-action@v5 => v6
This commit is contained in:
Arnaud Gissinger 2024-08-24 18:29:30 +02:00
parent b5c2cb8b73
commit 3b7579d776
2 changed files with 21 additions and 3 deletions

View File

@ -14,6 +14,12 @@ on:
ref:
required: true
type: string
workflow_dispatch:
inputs:
ref:
description: The ref to build from.
required: true
type: string
# By default, run all commands in a bash shell. On Windows, the default would
# otherwise be powershell.
@ -32,6 +38,11 @@ jobs:
ref: ${{ inputs.ref }}
submodules: recursive
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Build
shell: bash
run: docker buildx build .
run: docker buildx build --platform linux/amd64,linux/arm64 .

View File

@ -49,6 +49,11 @@ jobs:
submodules: recursive
fetch-tags: true
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
with:
platforms: linux/amd64,linux/arm64
- name: Log in to Docker Hub
uses: docker/login-action@v3
with:
@ -56,24 +61,26 @@ jobs:
password: ${{ secrets.DOCKERHUB_CI_TOKEN }}
- name: Push to Docker Hub
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
# Important: use actions/checkout source, which has the right tags!
# Without context: ., this action will try to fetch git source
# itself, and it will be unable to determine the correct version
# number.
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_PACKAGE_NAME }}:${{ inputs.tag }}
- name: Push to Docker Hub as "latest"
if: ${{ inputs.latest }}
uses: docker/build-push-action@v5
uses: docker/build-push-action@v6
with:
# Important: use actions/checkout source, which has the right tags!
# Without context: ., this action will try to fetch git source
# itself, and it will be unable to determine the correct version
# number.
context: .
platforms: linux/amd64,linux/arm64
push: true
tags: ${{ secrets.DOCKERHUB_PACKAGE_NAME }}:latest