File tree Expand file tree Collapse file tree 2 files changed +7
-30
lines changed Expand file tree Collapse file tree 2 files changed +7
-30
lines changed Original file line number Diff line number Diff line change 23
23
description : Platforms to build
24
24
default : multiplatform
25
25
options :
26
- - multiplatform
27
- - amd64
28
- - arm64
26
+ - linux/amd64,linux/arm64
27
+ - linux/ amd64
28
+ - linux/ arm64
29
29
pull_request :
30
30
branches :
31
31
- main
41
41
- name : Checkout
42
42
uses : actions/checkout@v4
43
43
44
- - name : Determine platforms to build
45
- id : determine_platforms
46
- run : |
47
- case "${{ inputs.platforms }}" in
48
- amd64)
49
- echo "Building for amd64"
50
- PLATFORMS="linux/amd64"
51
- ;;
52
- arm64)
53
- echo "Building for arm64"
54
- PLATFORMS="linux/arm64"
55
- ;;
56
- multiplatform | "")
57
- echo "Building for multiplatform"
58
- PLATFORMS="linux/amd64,linux/arm64"
59
- ;;
60
- *)
61
- echo "Invalid platform"
62
- exit 1
63
- ;;
64
- esac
65
- echo "platforms=${PLATFORMS}" >> $GITHUB_OUTPUT
66
-
67
44
- name : Login to Docker
68
45
uses : docker/login-action@v3
69
46
with :
91
68
uses : docker/build-push-action@v5
92
69
with :
93
70
context : .
94
- platforms : ${{ steps.determine_platforms.outputs. platforms }}
71
+ platforms : ${{ inputs. platforms || 'linux/amd64,linux/arm64' }}
95
72
push : true
96
73
tags : ${{ vars.DOCKER_HUB_ACCOUNT }}/dbc-demo:latest
97
74
cache-from : type=gha
102
79
uses : docker/build-push-action@v5
103
80
with :
104
81
context : .
105
- platforms : ${{ steps.determine_platforms.outputs. platforms }}
82
+ platforms : ${{ inputs. platforms || 'linux/amd64,linux/arm64' }}
106
83
push : true
107
84
tags : ${{ vars.DOCKER_HUB_ACCOUNT }}/dbc-demo:latest
Original file line number Diff line number Diff line change 8
8
secrets : inherit
9
9
with :
10
10
builder_type : local
11
- platforms : multiplatform
11
+ platforms : linux/amd64,linux/arm64
12
12
13
13
build_cloud :
14
14
uses : ./.github/workflows/ci.yaml
15
15
secrets : inherit
16
16
with :
17
17
builder_type : cloud
18
- platforms : multiplatform
18
+ platforms : linux/amd64,linux/arm64
19
19
You can’t perform that action at this time.
0 commit comments