0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-05-19 19:33:45 +02:00
construct/.github/workflows/docker_prime.yml

63 lines
1.6 KiB
YAML

#
# Build intermediate images
#
# Called to build lower-layer images which other images depend on. These are
# cached for use by the next layer but not shipped to users.
#
name: Docker Images Prime
on:
workflow_call:
inputs:
id:
type: string
description: Dockerhub acct/repo identity.
url:
type: string
description: Git repository for checkout.
features:
type: string
description: JSON array of feature-set names to build images for.
distros:
type: string
description: JSON array of operating system distros to build for.
machines:
type: string
description: JSON array of machines to build for.
test:
type: boolean
default: false
required: false
description: Echo all docker commands rather than invoking them.
concurrency:
group: ${{github.workflow}}-${{inputs.features}}
cancel-in-progress: false
env:
ctor_id: ${{inputs.id}}
ctor_url: ${{inputs.url}}
jobs:
prime:
runs-on: ${{matrix.machine}}
strategy:
fail-fast: true
matrix:
feature: ${{fromJSON(inputs.features)}}
distro: ${{fromJSON(inputs.distros)}}
machine: ${{fromJSON(inputs.machines)}}
steps:
- uses: actions/checkout@v3
- name: build
env:
ctor_features: ${{matrix.feature}}
ctor_distros: ${{matrix.distro}}
ctor_machines: ${{matrix.machine}}
ctor_toolchains: false
ctor_test: ${{inputs.test}}
run: |
docker/build-and-push-images.sh ${{matrix.feature}}