1+ ---
12name : release
23
34on :
@@ -13,71 +14,70 @@ jobs:
1314 strategy :
1415 matrix :
1516 build_cmd :
16- - ./build-latest.sh
17- - PRERELEASE=true ./build-latest.sh
18- - ./build.sh feature
19- - ./build.sh develop
17+ - ./build-latest.sh
18+ - PRERELEASE=true ./build-latest.sh
19+ - ./build.sh feature
20+ - ./build.sh develop
2021 platform :
21- - linux/amd64,linux/arm64
22+ - linux/amd64,linux/arm64
2223 fail-fast : false
2324 runs-on : ubuntu-latest
2425 name : Builds new NetBox Docker Images
2526 env :
2627 GH_ACTION : enable
2728 IMAGE_NAMES : docker.io/netboxcommunity/netbox quay.io/netboxcommunity/netbox ghcr.io/netbox-community/netbox
2829 steps :
29- - id : source-checkout
30- name : Checkout
31- uses : actions/checkout@v3
32- - id : set-netbox-docker-version
33- name : Get Version of NetBox Docker
34- run : |
35- echo "::set-output name=version::$(cat VERSION)"
36- shell : bash
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
44- name : Build the image with '${{ matrix.build_cmd }}'
45- run : ${{ matrix.build_cmd }}
46- - id : test-image
47- name : Test the image
48- run : IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
49- if : steps.docker-build.outputs.skipped != 'true'
50- # docker.io
51- - id : docker-io-login
52- name : Login to docker.io
53- uses : docker/login-action@v2
54- with :
55- registry : docker.io
56- username : ${{ secrets.dockerhub_username }}
57- password : ${{ secrets.dockerhub_password }}
58- if : steps.docker-build.outputs.skipped != 'true'
59- # quay.io
60- - id : quay-io-login
61- name : Login to Quay.io
62- uses : docker/login-action@v2
63- with :
64- registry : quay.io
65- username : ${{ secrets.quayio_username }}
66- password : ${{ secrets.quayio_password }}
67- if : steps.docker-build.outputs.skipped != 'true'
68- # ghcr.io
69- - id : ghcr-io-login
70- name : Login to GitHub Container Registry
71- uses : docker/login-action@v2
72- with :
73- registry : ghcr.io
74- username : ${{ github.repository_owner }}
75- password : ${{ secrets.GITHUB_TOKEN }}
76- if : steps.docker-build.outputs.skipped != 'true'
77- - id : build-and-push
78- name : Push the image
79- run : ${{ matrix.build_cmd }} --push
80- if : steps.docker-build.outputs.skipped != 'true'
81- env :
82- BUILDX_PLATFORM : ${{ matrix.platform }}
83- BUILDX_BUILDER_NAME : ${{ steps.buildx-setup.outputs.name }}
30+ - id : source-checkout
31+ name : Checkout
32+ uses : actions/checkout@v3
33+ - id : set-netbox-docker-version
34+ name : Get Version of NetBox Docker
35+ run : echo "::set-output name=version::$(cat VERSION)"
36+ shell : bash
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
44+ name : Build the image with '${{ matrix.build_cmd }}'
45+ run : ${{ matrix.build_cmd }}
46+ - id : test-image
47+ name : Test the image
48+ run : IMAGE="${FINAL_DOCKER_TAG}" ./test.sh
49+ if : steps.docker-build.outputs.skipped != 'true'
50+ # docker.io
51+ - id : docker-io-login
52+ name : Login to docker.io
53+ uses : docker/login-action@v2
54+ with :
55+ registry : docker.io
56+ username : ${{ secrets.dockerhub_username }}
57+ password : ${{ secrets.dockerhub_password }}
58+ if : steps.docker-build.outputs.skipped != 'true'
59+ # quay.io
60+ - id : quay-io-login
61+ name : Login to Quay.io
62+ uses : docker/login-action@v2
63+ with :
64+ registry : quay.io
65+ username : ${{ secrets.quayio_username }}
66+ password : ${{ secrets.quayio_password }}
67+ if : steps.docker-build.outputs.skipped != 'true'
68+ # ghcr.io
69+ - id : ghcr-io-login
70+ name : Login to GitHub Container Registry
71+ uses : docker/login-action@v2
72+ with :
73+ registry : ghcr.io
74+ username : ${{ github.repository_owner }}
75+ password : ${{ secrets.GITHUB_TOKEN }}
76+ if : steps.docker-build.outputs.skipped != 'true'
77+ - id : build-and-push
78+ name : Push the image
79+ run : ${{ matrix.build_cmd }} --push
80+ 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