Skip to content

Build Images

Build Images #11

Workflow file for this run

name: Build Images
on:
workflow_dispatch:
workflow_run:
workflows: [ Build Deps ]
types:
- completed
jobs:
prepare:
name: Prepare Build
runs-on: ubuntu-24.04
outputs:
dockerDistros: ${{ steps.set_matrix.outputs.dockerDistros }}
dotnetVersions: ${{ steps.set_matrix.outputs.dotnetVersions }}
dotnetVariants: ${{ steps.set_matrix.outputs.dotnetVariants }}
if: ${{ github.event.workflow_run.conclusion == 'success' || github.event_name == 'workflow_dispatch' }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache cake frosting
id: cache-cake
uses: actions/cache@v4
with:
path: run
key: run-${{ runner.os }}-${{ hashFiles('./build/**') }}
- name: Setup .NET SDK
uses: actions/setup-dotnet@v4
with:
global-json-file: build/global.json
- name: '[Prepare]'
if: steps.cache-cake.outputs.cache-hit != 'true'
run: dotnet build build/CI.sln --configuration=Release
- name: '[Matrix]'
id: set_matrix
run: dotnet run/build.dll --target=SetMatrix
build_images:
name: Build Images (${{ matrix.dotnet_variant }} - ${{ matrix.arch }})
secrets: inherit
needs: [ prepare ]
strategy:
fail-fast: false
matrix:
dotnet_variant: ${{ fromJson(needs.prepare.outputs.dotnetVariants) }}
arch: [ amd64, arm64 ]
runner: [ ubuntu-24.04, ubuntu-24.04-arm ]
exclude:
- runner: ubuntu-24.04-arm
arch: amd64
- runner: ubuntu-24.04
arch: arm64
uses: ./.github/workflows/_build-images.yml
with:
runner: ${{ matrix.runner }}
arch: ${{ matrix.arch }}
dotnet_variant: ${{ matrix.dotnet_variant }}
dotnet_versions: ${{ needs.prepare.outputs.dotnetVersions }}
docker_distros: ${{ needs.prepare.outputs.dockerDistros }}
build_images_manifest:
name: Build Images Manifest (${{ matrix.dotnet_variant }})
secrets: inherit
needs: [ prepare, build_images ]
strategy:
fail-fast: false
matrix:
dotnet_variant: ${{ fromJson(needs.prepare.outputs.dotnetVariants) }}
uses: ./.github/workflows/_build-images-manifest.yml
with:
runner: ${{ matrix.runner }}
dotnet_variant: ${{ matrix.dotnet_variant }}
dotnet_versions: ${{ needs.prepare.outputs.dotnetVersions }}
docker_distros: ${{ needs.prepare.outputs.dockerDistros }}