0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-01 03:18:54 +01:00
construct/.github/workflows/docker_prime.yml

63 lines
1.6 KiB
YAML
Raw Normal View History

#
# 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.
#
2023-03-31 23:52:30 +02:00
name: Docker Images Prime
on:
workflow_call:
inputs:
id:
type: string
description: Dockerhub acct/repo identity.
2023-03-31 23:52:30 +02:00
url:
type: string
description: Git repository for checkout.
2023-03-31 23:52:30 +02:00
features:
type: string
description: JSON array of feature-set names to build images for.
2023-03-31 23:52:30 +02:00
distros:
type: string
description: JSON array of operating system distros to build for.
2023-03-31 23:52:30 +02:00
machines:
type: string
description: JSON array of machines to build for.
2023-03-31 23:52:30 +02:00
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
2023-03-31 23:52:30 +02:00
env:
ctor_id: ${{inputs.id}}
ctor_url: ${{inputs.url}}
jobs:
prime:
runs-on: ${{matrix.machine}}
strategy:
fail-fast: true
2023-03-31 23:52:30 +02:00
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}}