Skip to content

Commit a2aa817

Browse files
committed
Add the workflow to build multiarch
1 parent 3375986 commit a2aa817

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

.github/workflows/docker.yml

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,18 @@ jobs:
2121
config:
2222
- {
2323
os: "ubuntu-latest",
24-
version: "linux"
24+
version: "linux",
25+
suffix: ""
26+
}
27+
- {
28+
os: "ubuntu-latest",
29+
version: "linux",
30+
suffix: ".multi"
2531
}
2632
- {
2733
os: "windows-2022",
28-
version: "win"
34+
version: "win",
35+
suffix: "",
2936
}
3037
permissions:
3138
packages: write
@@ -37,7 +44,7 @@ jobs:
3744
- name: Build image
3845
working-directory: ${{ matrix.config.version }}
3946
shell: bash
40-
run: docker build . --file Dockerfile --tag $IMAGE_NAME
47+
run: docker build . --file Dockerfile${{ matrix.config.suffix }} --tag $IMAGE_NAME
4148

4249
- name: Log in to registry
4350
if: ${{ github.event_name != 'pull_request'}} # && matrix.config.version == 'linux'}}
@@ -48,7 +55,7 @@ jobs:
4855
shell: bash
4956
if: ${{ github.event_name != 'pull_request'}} # && matrix.config.version == 'linux'}}
5057
run: |
51-
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME
58+
IMAGE_ID=ghcr.io/${{ github.repository_owner }}/$IMAGE_NAME${{ matrix.config.suffix }}
5259
5360
# Change all uppercase to lowercase
5461
IMAGE_ID=$(echo $IMAGE_ID | tr '[A-Z]' '[a-z]')

0 commit comments

Comments
 (0)