66 - published
77 schedule :
88 - cron : ' 45 5 * * *'
9+ workflow_dispatch :
910
1011jobs :
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 }}
0 commit comments