Skip to content

Commit 3dffa47

Browse files
committed
Build ARM64 images
1 parent fceb6e0 commit 3dffa47

File tree

4 files changed

+239
-220
lines changed

4 files changed

+239
-220
lines changed

.github/workflows/push.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,21 +46,32 @@ jobs:
4646
- PRERELEASE=true ./build-latest.sh
4747
- ./build.sh feature
4848
- ./build.sh develop
49-
docker_from:
50-
- '' # use the default of the build script
49+
platform:
50+
- linux/amd64
51+
- linux/arm64
5152
fail-fast: false
53+
env:
54+
GH_ACTION: enable
55+
IMAGE_NAMES: docker.io/netboxcommunity/netbox
5256
runs-on: ubuntu-latest
5357
name: Builds new NetBox Docker Images
5458
steps:
5559
- id: git-checkout
5660
name: Checkout
5761
uses: actions/checkout@v3
62+
- id: qemu-setup
63+
name: Set up QEMU
64+
uses: docker/setup-qemu-action@v1
65+
- id: buildx-setup
66+
name: Set up Docker Buildx
67+
uses: docker/setup-buildx-action@v1
5868
- id: docker-build
59-
name: Build the image from '${{ matrix.docker_from }}' with '${{ matrix.build_cmd }}'
69+
name: Build the image for '${{ matrix.platform }}' with '${{ matrix.build_cmd }}'
6070
run: ${{ matrix.build_cmd }}
6171
env:
6272
DOCKER_FROM: ${{ matrix.docker_from }}
63-
GH_ACTION: enable
73+
BUILDX_PLATFORM: ${{ matrix.platform }}
74+
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}
6475
- id: docker-test
6576
name: Test the image
6677
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh

.github/workflows/release.yml

Lines changed: 22 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ on:
66
- published
77
schedule:
88
- cron: '45 5 * * *'
9+
workflow_dispatch:
910

1011
jobs:
1112
build:
@@ -16,72 +17,67 @@ jobs:
1617
- PRERELEASE=true ./build-latest.sh
1718
- ./build.sh feature
1819
- ./build.sh develop
20+
platform:
21+
- linux/amd64,linux/arm64
1922
fail-fast: false
2023
runs-on: ubuntu-latest
2124
name: Builds new NetBox Docker Images
2225
env:
2326
GH_ACTION: enable
27+
IMAGE_NAMES: docker.io/tgenannt/netbox quay.io/tgenannt/netbox ghcr.io/tobiasge/netbox
2428
steps:
25-
-
29+
- id: source-checkout
2630
name: Checkout
2731
uses: actions/checkout@v3
28-
-
32+
- id: set-netbox-docker-version
2933
name: Get Version of NetBox Docker
3034
run: |
3135
echo "::set-output name=version::$(cat VERSION)"
3236
shell: bash
33-
-
34-
id: docker-build
37+
- id: qemu-setup
38+
name: Set up QEMU
39+
uses: docker/setup-qemu-action@v1
40+
- id: buildx-setup
41+
name: Set up Docker Buildx
42+
uses: docker/setup-buildx-action@v1
43+
- id: docker-build
3544
name: Build the image with '${{ matrix.build_cmd }}'
3645
run: ${{ matrix.build_cmd }}
37-
-
46+
- id: test-image
3847
name: Test the image
3948
run: IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
4049
if: steps.docker-build.outputs.skipped != 'true'
41-
4250
# docker.io
43-
-
51+
- id: docker-io-login
4452
name: Login to docker.io
4553
uses: docker/login-action@v2
4654
with:
4755
registry: docker.io
4856
username: ${{ secrets.dockerhub_username }}
4957
password: ${{ secrets.dockerhub_password }}
5058
if: steps.docker-build.outputs.skipped != 'true'
51-
-
52-
name: Push the image to docker.io
53-
run: ${{ matrix.build_cmd }} --push-only
54-
if: steps.docker-build.outputs.skipped != 'true'
55-
5659
# quay.io
57-
-
60+
- id: quay-io-login
5861
name: Login to Quay.io
5962
uses: docker/login-action@v2
6063
with:
6164
registry: quay.io
6265
username: ${{ secrets.quayio_username }}
6366
password: ${{ secrets.quayio_password }}
6467
if: steps.docker-build.outputs.skipped != 'true'
65-
-
66-
name: Build and push the image with '${{ matrix.build_cmd }}'
67-
run: ${{ matrix.build_cmd }} --push
68-
env:
69-
DOCKER_REGISTRY: quay.io
70-
if: steps.docker-build.outputs.skipped != 'true'
71-
7268
# ghcr.io
73-
-
69+
- id: ghcr-io-login
7470
name: Login to GitHub Container Registry
7571
uses: docker/login-action@v2
7672
with:
7773
registry: ghcr.io
7874
username: ${{ github.repository_owner }}
7975
password: ${{ secrets.GITHUB_TOKEN }}
8076
if: steps.docker-build.outputs.skipped != 'true'
81-
-
82-
name: Build and push the image with '${{ matrix.build_cmd }}'
77+
- id: build-and-push
78+
name: Push the image
8379
run: ${{ matrix.build_cmd }} --push
84-
env:
85-
DOCKER_REGISTRY: ghcr.io
86-
DOCKER_ORG: netbox-community
8780
if: steps.docker-build.outputs.skipped != 'true'
81+
env:
82+
BUILDX_PLATFORM: ${{ matrix.platform }}
83+
BUILDX_BUILDER_NAME: ${{ steps.buildx-setup.outputs.name }}

build-functions/docker-functions.sh

Lines changed: 0 additions & 8 deletions
This file was deleted.

0 commit comments

Comments
 (0)