Skip to content

Commit f7924d0

Browse files
authored
separate container builds on respective architecture to get around cross platform seg fault (#400)
1 parent d176fd5 commit f7924d0

4 files changed

+71
-4
lines changed

.github/linters/actionlint.yml

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# We aren't actually hosting this, actionlint
2+
# just doesn't have the arm runners listed
3+
# in their defaults
4+
self-hosted-runner:
5+
labels:
6+
- ubuntu-24.04-arm

.github/workflows/docker-build-container.yaml

+21-2
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ permissions:
1010
contents: read
1111

1212
jobs:
13-
docker-build-container:
13+
docker-build-amd-container:
1414
runs-on: ubuntu-latest
1515

1616
steps:
@@ -20,11 +20,30 @@ jobs:
2020
echo "repo=$(basename ${{ github.repository }})" >> "$GITHUB_OUTPUT"
2121
shell: bash
2222

23-
- name: Build docker image
23+
- name: Build docker image amd
2424
uses: senzing-factory/github-action-docker-buildx-build@v1
2525
with:
2626
build-options: "-q"
2727
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
2828
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
2929
platforms: linux/amd64
3030
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
32+
docker-build-arm-container:
33+
runs-on: ubuntu-24.04-arm
34+
35+
steps:
36+
- name: Get repository name
37+
id: repo-basename
38+
run: |
39+
echo "repo=$(basename ${{ github.repository }})" >> "$GITHUB_OUTPUT"
40+
shell: bash
41+
42+
- name: Build docker image arm
43+
uses: senzing-factory/github-action-docker-buildx-build@v1
44+
with:
45+
build-options: "-q"
46+
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
47+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
48+
platforms: linux/arm64
49+
username: ${{ secrets.DOCKERHUB_USERNAME }}

.github/workflows/docker-push-containers-to-dockerhub-manual.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ permissions:
77
contents: read
88

99
jobs:
10-
docker-push-containers-to-dockerhub-manual:
10+
docker-push-amd-container-to-dockerhub-manual:
1111
runs-on: ubuntu-latest
1212

1313
steps:
@@ -24,4 +24,25 @@ jobs:
2424
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
2525
image-tag: latest
2626
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
27+
platforms: linux/amd64
28+
username: ${{ secrets.DOCKERHUB_USERNAME }}
29+
30+
docker-push-arm-container-to-dockerhub-manual:
31+
runs-on: ubuntu-24.04-arm
32+
33+
steps:
34+
- name: Get repo name
35+
id: repo-basename
36+
run: |
37+
echo "repo=$(basename ${{ github.repository }})" >> "$GITHUB_OUTPUT"
38+
shell: bash
39+
40+
- name: Build docker image and push to DockerHub
41+
uses: senzing-factory/github-action-docker-buildx-build@v1
42+
with:
43+
build-options: "-q --push"
44+
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
45+
image-tag: latest
46+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
47+
platforms: linux/arm64
2748
username: ${{ secrets.DOCKERHUB_USERNAME }}

.github/workflows/docker-push-containers-to-dockerhub.yaml

+22-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ permissions:
99
contents: read
1010

1111
jobs:
12-
docker-push-containers-to-dockerhub:
12+
docker-push-amd-container-to-dockerhub:
1313
runs-on: ubuntu-latest
1414

1515
steps:
@@ -26,4 +26,25 @@ jobs:
2626
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
2727
image-tag: ${{ github.ref_name }}
2828
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
29+
platforms: linux/amd64
30+
username: ${{ secrets.DOCKERHUB_USERNAME }}
31+
32+
docker-push-arm-container-to-dockerhub:
33+
runs-on: ubuntu-24.04-arm
34+
35+
steps:
36+
- name: Get repository name
37+
id: repo-basename
38+
run: |
39+
echo "repo=$(basename ${{ github.repository }})" >> "$GITHUB_OUTPUT"
40+
shell: bash
41+
42+
- name: Build docker image and push to DockerHub
43+
uses: senzing-factory/github-action-docker-buildx-build@v1
44+
with:
45+
build-options: "-q --push"
46+
image-repository: senzing/${{ steps.repo-basename.outputs.repo }}
47+
image-tag: ${{ github.ref_name }}
48+
password: ${{ secrets.DOCKERHUB_ACCESS_TOKEN }}
49+
platforms: linux/arm64
2950
username: ${{ secrets.DOCKERHUB_USERNAME }}

0 commit comments

Comments
 (0)