myos-builder #1665
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: myos-builder | |
| on: | |
| schedule: | |
| - cron: "00 06 * * *" | |
| push: | |
| paths-ignore: | |
| - "**.md" | |
| pull_request: | |
| workflow_dispatch: | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref || github.run_id }} | |
| cancel-in-progress: true | |
| jobs: | |
| validate-runtime-artifacts: | |
| name: Validate runtime artifacts | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check runtime scripts, templates, and units | |
| run: | | |
| set -euo pipefail | |
| bash ./scripts/validate-runtime-artifacts.sh | |
| validate-image-matrix: | |
| name: Validate image matrix | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Check supported and unsupported recipe combinations | |
| run: | | |
| set -euo pipefail | |
| bash ./scripts/validate-image-matrix.sh | |
| validate-alma9-nvidia-580: | |
| name: Validate Alma 9 NVIDIA 580 | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - name: Verify Alma 9 NVIDIA 580 lane | |
| shell: pwsh | |
| run: ./scripts/verify-alma9-nvidia-580.ps1 | |
| define-image-matrix: | |
| name: Define image matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| server_images: ${{ steps.render.outputs.server_images }} | |
| workstation_images: ${{ steps.render.outputs.workstation_images }} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| - id: render | |
| name: Render supported image matrices | |
| run: | | |
| set -euo pipefail | |
| emit_output() { | |
| local name="$1" | |
| shift | |
| { | |
| printf '%s<<EOF\n' "$name" | |
| "$@" | |
| printf 'EOF\n' | |
| } >> "$GITHUB_OUTPUT" | |
| } | |
| emit_output server_images python3 ./scripts/render-image-matrix.py gha server-images | |
| emit_output workstation_images python3 ./scripts/render-image-matrix.py gha workstation-images | |
| server-images: | |
| name: Server Images (${{ matrix.name }}) | |
| if: ${{ needs.define-image-matrix.result == 'success' }} | |
| needs: | |
| - validate-runtime-artifacts | |
| - validate-image-matrix | |
| - validate-alma9-nvidia-580 | |
| - define-image-matrix | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJSON(needs.define-image-matrix.outputs.server_images) }} | |
| steps: | |
| - name: Build Server image | |
| uses: blue-build/github-action@v1.11 | |
| with: | |
| recipe: ${{ matrix.recipe }} | |
| cosign_private_key: ${{ secrets.SIGNING_SECRET }} | |
| registry_token: ${{ github.token }} | |
| pr_event_number: ${{ github.event.number }} | |
| rechunk: true | |
| maximize_build_space: true | |
| workstation-images: | |
| name: Workstation Images (${{ matrix.name }}) | |
| if: ${{ needs.define-image-matrix.result == 'success' }} | |
| needs: | |
| - validate-runtime-artifacts | |
| - validate-image-matrix | |
| - validate-alma9-nvidia-580 | |
| - define-image-matrix | |
| runs-on: ubuntu-latest | |
| permissions: | |
| contents: read | |
| packages: write | |
| id-token: write | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: ${{ fromJSON(needs.define-image-matrix.outputs.workstation_images) }} | |
| steps: | |
| - name: Build Workstation image | |
| uses: blue-build/github-action@v1.11 | |
| with: | |
| recipe: ${{ matrix.recipe }} | |
| cosign_private_key: ${{ secrets.SIGNING_SECRET }} | |
| registry_token: ${{ github.token }} | |
| pr_event_number: ${{ github.event.number }} | |
| rechunk: true | |
| maximize_build_space: true |