Use develop branch for pre-releases

This commit is contained in:
Tobias Genannt 2025-04-19 17:36:09 +02:00
parent 8f7c21749e
commit 8431b77422

View File

@ -13,11 +13,13 @@ jobs:
build: build:
strategy: strategy:
matrix: matrix:
build_cmd: build:
- ./build-latest.sh - { "cmd": "./build-latest.sh", "branch": "release" }
- PRERELEASE=true ./build-latest.sh - { "cmd": "./build.sh main", "branch": "release" }
- ./build.sh feature # Build pre release images from our develop branch
- ./build.sh main # This is used to test the latest changes before they are merged into the main branch
- { "cmd": "PRERELEASE=true ./build-latest.sh", "branch": "develop" }
- { "cmd": "./build.sh feature", "branch": "develop" }
platform: platform:
- linux/amd64,linux/arm64 - linux/amd64,linux/arm64
fail-fast: false fail-fast: false
@ -31,15 +33,17 @@ jobs:
- id: source-checkout - id: source-checkout
name: Checkout name: Checkout
uses: actions/checkout@v4 uses: actions/checkout@v4
with:
ref: ${{ matrix.build.branch }}
- id: set-netbox-docker-version - id: set-netbox-docker-version
name: Get Version of NetBox Docker name: Get Version of NetBox Docker
run: echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT" run: echo "version=$(cat VERSION)" >>"$GITHUB_OUTPUT"
shell: bash shell: bash
- id: check-build-needed - id: check-build-needed
name: Check if the build is needed for '${{ matrix.build_cmd }}' name: Check if the build is needed for '${{ matrix.build.cmd }}'
env: env:
CHECK_ONLY: "true" CHECK_ONLY: "true"
run: ${{ matrix.build_cmd }} run: ${{ matrix.build.cmd }}
# docker.io # docker.io
- id: docker-io-login - id: docker-io-login
name: Login to docker.io name: Login to docker.io
@ -77,7 +81,7 @@ jobs:
if: steps.check-build-needed.outputs.skipped != 'true' if: steps.check-build-needed.outputs.skipped != 'true'
- id: build-and-push - id: build-and-push
name: Push the image name: Push the image
run: ${{ matrix.build_cmd }} --push run: ${{ matrix.build.cmd }} --push
if: steps.check-build-needed.outputs.skipped != 'true' if: steps.check-build-needed.outputs.skipped != 'true'
env: env:
BUILDX_PLATFORM: ${{ matrix.platform }} BUILDX_PLATFORM: ${{ matrix.platform }}