Skip to content

Build All Expt Images And Runtimes #5

Build All Expt Images And Runtimes

Build All Expt Images And Runtimes #5

name: Build All Expt Images And Runtimes
on:
workflow_dispatch:
inputs:
tag:
description: 'Tag for the Docker image'
required: true
default: 'latest'
tools_version:
description: 'Base tools version (optional, defaults to tag if not specified)'
required: false
type: string
default: ''
os_version:
description: 'OS image version (optional, defaults to tag if not specified)'
required: false
type: string
default: ''
framework_image_version:
description: 'Framework image version (optional, defaults to tag if not specified)'
required: false
type: string
default: ''
l10n:
description: 'Localization setting (choose one or both)'
required: false
type: choice
options:
- en_US
- zh_CN
- both
default: 'en_US'
arch:
description: 'System architecture (choose one or both)'
required: false
type: choice
options:
- amd64
- arm64
- both
default: 'amd64'
aliyun_enabled:
description: 'Enable Aliyun ACR builds'
required: false
type: boolean
default: false
permissions:
contents: read
packages: write
jobs:
build-tools:
name: Tools Image
uses: ./.github/workflows/build-expt-tools.yml
with:
image_tag: ${{ inputs.tools_version != '' && inputs.tools_version || inputs.tag }}
architectures: ${{ inputs.arch == 'both' && 'amd64,arm64' || inputs.arch }}
push: true
secrets: inherit
build-os-base:
name: Base Images (OS)
needs: build-tools
uses: ./.github/workflows/build-expt-image-or-runtime.yaml
with:
tag: ${{ inputs.tag }}
kind: operating-systems
name: ''
build_type: images
tools_version: ${{ needs['build-tools'].outputs.image_tag }}
os_version: ${{ inputs.os_version }}
framework_image_version: ${{ inputs.framework_image_version }}
l10n: ${{ inputs.l10n }}
arch: ${{ inputs.arch }}
aliyun_enabled: ${{ inputs.aliyun_enabled }}
secrets: inherit
build-language-base:
name: Base Images (Languages)
needs: [build-tools, build-os-base]
uses: ./.github/workflows/build-expt-image-or-runtime.yaml
with:
tag: ${{ inputs.tag }}
kind: languages
name: ''
build_type: images
tools_version: ${{ needs['build-tools'].outputs.image_tag }}
os_version: ${{ inputs.os_version }}
framework_image_version: ${{ inputs.framework_image_version }}
l10n: ${{ inputs.l10n }}
arch: ${{ inputs.arch }}
aliyun_enabled: ${{ inputs.aliyun_enabled }}
secrets: inherit
build-framework-base:
name: Base Images (Frameworks)
needs: [build-tools, build-language-base]
uses: ./.github/workflows/build-expt-image-or-runtime.yaml
with:
tag: ${{ inputs.tag }}
kind: frameworks
name: ''
build_type: images
tools_version: ${{ needs['build-tools'].outputs.image_tag }}
os_version: ${{ inputs.os_version }}
framework_image_version: ${{ inputs.framework_image_version }}
l10n: ${{ inputs.l10n }}
arch: ${{ inputs.arch }}
aliyun_enabled: ${{ inputs.aliyun_enabled }}
secrets: inherit
build-os-runtime:
name: Runtime Images (OS)
needs: [build-tools, build-framework-base]
uses: ./.github/workflows/build-expt-image-or-runtime.yaml
with:
tag: ${{ inputs.tag }}
kind: operating-systems
name: ''
build_type: runtimes
tools_version: ${{ needs['build-tools'].outputs.image_tag }}
os_version: ${{ inputs.os_version }}
framework_image_version: ${{ inputs.framework_image_version }}
l10n: ${{ inputs.l10n }}
arch: ${{ inputs.arch }}
aliyun_enabled: ${{ inputs.aliyun_enabled }}
secrets: inherit
build-language-runtime:
name: Runtime Images (Languages)
needs: [build-tools, build-os-runtime]
uses: ./.github/workflows/build-expt-image-or-runtime.yaml
with:
tag: ${{ inputs.tag }}
kind: languages
name: ''
build_type: runtimes
tools_version: ${{ needs['build-tools'].outputs.image_tag }}
os_version: ${{ inputs.os_version }}
framework_image_version: ${{ inputs.framework_image_version }}
l10n: ${{ inputs.l10n }}
arch: ${{ inputs.arch }}
aliyun_enabled: ${{ inputs.aliyun_enabled }}
secrets: inherit
build-framework-runtime:
name: Runtime Images (Frameworks)
needs: [build-tools, build-language-runtime]
uses: ./.github/workflows/build-expt-image-or-runtime.yaml
with:
tag: ${{ inputs.tag }}
kind: frameworks
name: ''
build_type: runtimes
tools_version: ${{ needs['build-tools'].outputs.image_tag }}
os_version: ${{ inputs.os_version }}
framework_image_version: ${{ inputs.framework_image_version }}
l10n: ${{ inputs.l10n }}
arch: ${{ inputs.arch }}
aliyun_enabled: ${{ inputs.aliyun_enabled }}
secrets: inherit
build-summary:
runs-on: ubuntu-latest
needs:
[
build-tools,
build-os-base,
build-language-base,
build-framework-base,
build-os-runtime,
build-language-runtime,
build-framework-runtime
]
if: always()
steps:
- name: Download image lists
continue-on-error: true
uses: actions/download-artifact@v4
with:
pattern: image-list-*
path: image-lists
- name: Write image list summary
if: always()
shell: bash
run: |
set -euo pipefail
if [ -d image-lists ]; then
find image-lists -type f -print0 | xargs -0 cat | sed '/^[[:space:]]*$/d' | sort -u > "$GITHUB_STEP_SUMMARY"
fi
- name: Fail if any builds failed
if: ${{ !(needs.build-tools.result == 'success' && needs.build-os-base.result == 'success' && needs.build-language-base.result == 'success' && needs.build-framework-base.result == 'success' && needs.build-os-runtime.result == 'success' && needs.build-language-runtime.result == 'success' && needs.build-framework-runtime.result == 'success') }}
run: exit 1