Skip to content

BuildImage

BuildImage #6

Workflow file for this run

name: BuildImage
on:
workflow_dispatch:
inputs:
cmake-version:
description: 'CMake version'
required: true
default: '3.30.2'
permissions: # added using https://github.com/step-security/secure-workflows
contents: read
jobs:
build_multi_arch_images:
runs-on: ubuntu-latest
steps:
- name: Set up QEMU
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3.2.0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3.6.1
- name: Login to DockerHub
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3.3.0
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Build and push Multi Arch buildimage
id: docker_build
uses: docker/build-push-action@5176d81f87c23d6fc96624dfdbcd9f3830bbe445 # v6.5.0
with:
file: ./Dockerfile
build-args: CMAKE_VERSION=${{ github.event.inputs.cmake-version }}
push: true
provenance: true
tags: |
atsigncompany/cbuildimage:latest
atsigncompany/cbuildimage:GHA_${{ github.run_number }}
platforms: |
linux/amd64
linux/arm64/v8
slsa_provenance:
needs: [build_multi_arch_images]
permissions:
actions: read # for detecting the Github Actions environment.
id-token: write # for creating OIDC tokens for signing.
packages: write # for uploading attestations.
uses: slsa-framework/slsa-github-generator/.github/workflows/[email protected]
with:
image: "atsigncompany/cbuildimage"
digest: ${{ needs.build_multi_arch_images.outputs.digest }}
secrets:
registry-username: ${{ secrets.DOCKERHUB_USERNAME }}
registry-password: ${{ secrets.DOCKERHUB_TOKEN }}