File tree Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Expand file tree Collapse file tree 2 files changed +32
-4
lines changed Original file line number Diff line number Diff line change 1
1
name : Build and Push
2
2
3
3
on :
4
+ workflow_call :
5
+ inputs :
6
+ builder_type :
7
+ required : true
8
+ type : string
9
+ platforms :
10
+ required : true
11
+ type : string
4
12
workflow_dispatch :
5
13
inputs :
6
14
builder_type :
28
36
jobs :
29
37
build :
30
38
runs-on : ubuntu-latest
39
+ environment : ${{ inputs.builder_type }}
31
40
steps :
32
41
- name : Checkout
33
42
uses : actions/checkout@v4
34
43
35
44
- name : Determine platforms to build
36
45
id : determine_platforms
37
46
run : |
38
- case "${{ github.event. inputs.platforms }}" in
47
+ case "${{ inputs.platforms }}" in
39
48
amd64)
40
49
echo "Building for amd64"
41
50
PLATFORMS="linux/amd64"
@@ -62,15 +71,15 @@ jobs:
62
71
password : ${{ secrets.DOCKER_PASSWORD }}
63
72
64
73
- name : Set up QEMU
65
- if : ${{ github.event. inputs.builder_type == 'local' }}
74
+ if : ${{ inputs.builder_type == 'local' }}
66
75
uses : docker/setup-qemu-action@v3
67
76
68
77
- name : Set up Docker Buildx (local)
69
- if : ${{ github.event. inputs.builder_type == 'local' }}
78
+ if : ${{ inputs.builder_type == 'local' }}
70
79
uses : docker/setup-buildx-action@v3
71
80
72
81
- name : Set up Docker Buildx (cloud)
73
- if : ${{ github.event. inputs.builder_type != 'local' }}
82
+ if : ${{ inputs.builder_type != 'local' }}
74
83
uses : docker/setup-buildx-action@v3
75
84
with :
76
85
version : lab:latest
Original file line number Diff line number Diff line change
1
+ name : Compare Builders
2
+ on :
3
+ workflow_dispatch :
4
+
5
+ jobs :
6
+ build_local :
7
+ uses : ./.github/workflows/ci.yaml
8
+ secrets : inherit
9
+ with :
10
+ builder_type : local
11
+ platforms : multiplatform
12
+
13
+ build_cloud :
14
+ uses : ./.github/workflows/ci.yaml
15
+ secrets : inherit
16
+ with :
17
+ builder_type : cloud
18
+ platforms : multiplatform
19
+
You can’t perform that action at this time.
0 commit comments