Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 15 additions & 8 deletions .github/workflows/container-image.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,13 @@
# The Build and Publish Container Image workflow builds container images and pushes them to both
# GitHub Container Registry (GHCR) and Docker Hub. It sets up QEMU and Docker Buildx for cross-platform
# builds, and builds the container images using the Containerfile. For all non-pull request events that
# trigger this workflow, it logs into GHCR and Docker Hub using credentials from the workflow call inputs,
# tags and pushes the images to both registries, and generates and pushes signed build provenance attestations
# to each registry. Additionally, when a building and publishing the latest tag, it syncs the README file
# determined by the container_readme_filepath input (or the For-Container.md file found in the ./doc/ directory
# if not provided) with Docker Hub. For pull request events, it just builds the images but does not push them
# to the registries.
# GitHub Container Registry (GHCR) and Docker Hub. It sets up QEMU conditionally based on the skip_qemu input,
# and Docker Buildx for cross-platform builds, and builds the container images using the Containerfile.
#
# For all non-pull request events that trigger this workflow, it logs into GHCR and Docker Hub using credentials
# from the workflow call inputs, tags and pushes the images to both registries, and generates and pushes signed
# build provenance attestations to each registry. Additionally, when a building and publishing the latest tag,
# it syncs the README file determined by the container_readme_filepath input (or the For-Container.md file found
# in the ./doc/ directory if not provided) with Docker Hub. For pull request events, it just builds the images but
# does not push them to the registries.

name: Container Image

Expand All @@ -25,6 +26,11 @@ on:
required: false
type: string
description: 'Path to the README file to sync with Docker Hub. Defaults to the For-Container.md file in the ./doc/ directory.'
skip_qemu:
required: false
type: boolean
default: false
description: 'If true, skips the QEMU setup step. Only set this to true if the Containerfile cross-compiles for all target platforms without emulation.'
# We do not need to require the secrets.GITHUB_TOKEN here because it is automatically
# inherited from the workflow call [^1].
#
Expand Down Expand Up @@ -136,6 +142,7 @@ jobs:
type=raw,value=latest,enable=${{ env.LATEST }}

- name: Set up QEMU
if: ${{ ! inputs.skip_qemu }}
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
Expand Down
Loading