mirror of
https://github.com/matrix-construct/construct
synced 2024-05-19 19:33:45 +02:00
github/workflows/docker: Tweak concurrency group; prime images fail fast; comments/cleanup.
This commit is contained in:
parent
79f5e4fd8d
commit
cab2b4c822
14
.github/workflows/docker.yml
vendored
14
.github/workflows/docker.yml
vendored
|
@ -1,9 +1,8 @@
|
||||||
|
#
|
||||||
|
# Build docker images
|
||||||
|
#
|
||||||
name: Docker Images
|
name: Docker Images
|
||||||
|
|
||||||
env:
|
|
||||||
ctor_id: ${{ vars.DOCKER_ID }}
|
|
||||||
ctor_url: https://github.com/${{github.repository}}
|
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
|
@ -15,7 +14,12 @@ concurrency:
|
||||||
group: ${{ github.ref }}
|
group: ${{ github.ref }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
|
||||||
|
env:
|
||||||
|
ctor_id: ${{ vars.DOCKER_ID }}
|
||||||
|
ctor_url: https://github.com/${{github.repository}}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
# Build the base-feature intermediate images (cached and not shipped).
|
||||||
base:
|
base:
|
||||||
uses: ./.github/workflows/docker_prime.yml
|
uses: ./.github/workflows/docker_prime.yml
|
||||||
with:
|
with:
|
||||||
|
@ -26,6 +30,7 @@ jobs:
|
||||||
machines: ${{vars.DOCKER_MACHINES}}
|
machines: ${{vars.DOCKER_MACHINES}}
|
||||||
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
|
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
|
||||||
|
|
||||||
|
# Build the full-feature intermediate images (cached and not shipped).
|
||||||
full:
|
full:
|
||||||
uses: ./.github/workflows/docker_prime.yml
|
uses: ./.github/workflows/docker_prime.yml
|
||||||
needs: [base]
|
needs: [base]
|
||||||
|
@ -37,6 +42,7 @@ jobs:
|
||||||
machines: ${{vars.DOCKER_MACHINES}}
|
machines: ${{vars.DOCKER_MACHINES}}
|
||||||
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
|
test: ${{contains(github.events.push.commits[0].message, '[ci test]')}}
|
||||||
|
|
||||||
|
# Build the leaf images (shipped and not cached)
|
||||||
built:
|
built:
|
||||||
needs: [base, full]
|
needs: [base, full]
|
||||||
runs-on: ${{matrix.machine}}
|
runs-on: ${{matrix.machine}}
|
||||||
|
|
22
.github/workflows/docker_prime.yml
vendored
22
.github/workflows/docker_prime.yml
vendored
|
@ -1,3 +1,9 @@
|
||||||
|
#
|
||||||
|
# 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
|
name: Docker Images Prime
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
@ -5,32 +11,38 @@ on:
|
||||||
inputs:
|
inputs:
|
||||||
id:
|
id:
|
||||||
type: string
|
type: string
|
||||||
|
description: Dockerhub acct/repo identity.
|
||||||
url:
|
url:
|
||||||
type: string
|
type: string
|
||||||
|
description: Git repository for checkout.
|
||||||
features:
|
features:
|
||||||
type: string
|
type: string
|
||||||
|
description: JSON array of feature-set names to build images for.
|
||||||
distros:
|
distros:
|
||||||
type: string
|
type: string
|
||||||
|
description: JSON array of operating system distros to build for.
|
||||||
machines:
|
machines:
|
||||||
type: string
|
type: string
|
||||||
|
description: JSON array of machines to build for.
|
||||||
test:
|
test:
|
||||||
type: boolean
|
type: boolean
|
||||||
default: false
|
default: false
|
||||||
required: false
|
required: false
|
||||||
|
description: Echo all docker commands rather than invoking them.
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: ${{github.workflow}}-${{inputs.features}}
|
||||||
|
cancel-in-progress: false
|
||||||
|
|
||||||
env:
|
env:
|
||||||
ctor_id: ${{inputs.id}}
|
ctor_id: ${{inputs.id}}
|
||||||
ctor_url: ${{inputs.url}}
|
ctor_url: ${{inputs.url}}
|
||||||
|
|
||||||
concurrency:
|
|
||||||
group: ${{github.run_id}}
|
|
||||||
cancel-in-progress: true
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
prime:
|
prime:
|
||||||
runs-on: ${{matrix.machine}}
|
runs-on: ${{matrix.machine}}
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: true
|
||||||
matrix:
|
matrix:
|
||||||
feature: ${{fromJSON(inputs.features)}}
|
feature: ${{fromJSON(inputs.features)}}
|
||||||
distro: ${{fromJSON(inputs.distros)}}
|
distro: ${{fromJSON(inputs.distros)}}
|
||||||
|
|
Loading…
Reference in a new issue