1
1
---
2
2
name : Docker images build and push
3
3
4
- # on:
5
- # push:
6
- # branches:
7
- # - 'develop'
8
- # paths:
9
- # - util/dockerfiles/**
10
4
on :
5
+ push :
6
+ branches :
7
+ - develop
8
+ paths :
9
+ - util/dockerfiles/**
11
10
workflow_dispatch :
12
11
13
12
20
19
21
20
steps :
22
21
- name : Checkout
23
- uses : actions/checkout@v4
22
+ uses : actions/checkout@v3
24
23
25
24
- name : List targets
26
25
id : generate
@@ -29,13 +28,44 @@ jobs:
29
28
target : default
30
29
workdir : util/dockerfiles
31
30
32
- docker-buildx-bake :
31
+ docker-buildx-bake-base-images :
32
+ # This job is used to build the base images -- the images which other
33
+ # images use as a base (usually an Ubuntu release).
34
+ # We do this prior to building the other images to ensure that the base
35
+ # are available when building the other images.
36
+ runs-on : [self-hosted, linux, x64]
37
+ steps :
38
+ - name : Set up QEMU
39
+ uses : docker/setup-qemu-action@v3
40
+
41
+ - name : Set up Docker Buildx
42
+ uses : docker/setup-buildx-action@v3
43
+
44
+ - name : Login to GitHub Container Registry
45
+ uses : docker/login-action@v3
46
+ with :
47
+ registry : ghcr.io
48
+ username : ${{ github.repository_owner }}
49
+ password : ${{ secrets.GITHUB_TOKEN }}
50
+
51
+ - name : Build and Push
52
+ uses : docker/bake-action@v6
53
+ with :
54
+ source : ' {{defaultContext}}:util/dockerfiles'
55
+ targets : base-images
56
+ provenance : true
57
+ push : true
58
+
59
+ docker-buildx-bake-all :
33
60
runs-on : [self-hosted, linux, x64]
34
61
needs :
35
62
- obtain-targets
63
+ - docker-buildx-bake-base-images
36
64
37
65
strategy :
38
66
fail-fast : false
67
+ # Limit the number of parallel jobs to not overwhelm the runners
68
+ max-parallel : 4
39
69
matrix :
40
70
target : ${{ fromJSON(needs.obtain-targets.outputs.targets) }}
41
71
0 commit comments