@@ -13,11 +13,13 @@ jobs:
1313 build :
1414 strategy :
1515 matrix :
16- build_cmd :
17- - ./build-latest.sh
18- - PRERELEASE=true ./build-latest.sh
19- - ./build.sh feature
20- - ./build.sh main
16+ build :
17+ - { "cmd": "./build-latest.sh", "branch": "release" }
18+ - { "cmd": "./build.sh main", "branch": "release" }
19+ # Build pre release images from our develop branch
20+ # This is used to test the latest changes before they are merged into the main branch
21+ - { "cmd": "PRERELEASE=true ./build-latest.sh", "branch": "develop" }
22+ - { "cmd": "./build.sh feature", "branch": "develop" }
2123 platform :
2224 - linux/amd64,linux/arm64
2325 fail-fast : false
@@ -31,15 +33,17 @@ jobs:
3133 - id : source-checkout
3234 name : Checkout
3335 uses : actions/checkout@v4
36+ with :
37+ ref : ${{ matrix.build.branch }}
3438 - id : set-netbox-docker-version
3539 name : Get Version of NetBox Docker
3640 run : echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT"
3741 shell : bash
3842 - id : check-build-needed
39- name : Check if the build is needed for '${{ matrix.build_cmd }}'
43+ name : Check if the build is needed for '${{ matrix.build.cmd }}'
4044 env :
4145 CHECK_ONLY : " true"
42- run : ${{ matrix.build_cmd }}
46+ run : ${{ matrix.build.cmd }}
4347 # docker.io
4448 - id : docker-io-login
4549 name : Login to docker.io
7781 if : steps.check-build-needed.outputs.skipped != 'true'
7882 - id : build-and-push
7983 name : Push the image
80- run : ${{ matrix.build_cmd }} --push
84+ run : ${{ matrix.build.cmd }} --push
8185 if : steps.check-build-needed.outputs.skipped != 'true'
8286 env :
8387 BUILDX_PLATFORM : ${{ matrix.platform }}
0 commit comments