From 7f3ce7f969df218934a91a25e9f5e7b1c8b0fb1b Mon Sep 17 00:00:00 2001 From: Michael Schiemer Date: Sun, 2 Nov 2025 23:12:18 +0100 Subject: [PATCH] fix: update build workflow default branch to staging - Change default branch from 'main' to 'staging' - Add choice input type for branch selection - Add debug check for RUNTIME_IMAGE_NAME - Remove unused env variable --- .gitea/workflows/build-image.yml | 25 +++++++++++++++++-------- 1 file changed, 17 insertions(+), 8 deletions(-) diff --git a/.gitea/workflows/build-image.yml b/.gitea/workflows/build-image.yml index 9fe9d6f5..9c79648e 100644 --- a/.gitea/workflows/build-image.yml +++ b/.gitea/workflows/build-image.yml @@ -13,7 +13,12 @@ on: branch: description: 'Branch to build from' required: false - default: 'main' + type: choice + options: + - staging + - main + - develop + default: 'staging' force_build: description: 'Force image build even if no runtime changes detected' type: boolean @@ -46,7 +51,7 @@ jobs: REF="${{ github.ref_name }}" fi if [ -z "$REF" ]; then - REF="${{ inputs.branch || 'main' }}" + REF="${{ inputs.branch || 'staging' }}" fi URL="https://git.michaelschiemer.de/${{ github.repository }}/raw/${REF}/scripts/ci/clone_repo.sh" mkdir -p /tmp/ci-tools @@ -79,7 +84,7 @@ jobs: REF_NAME="$INPUT_BRANCH" fi if [ -z "$REF_NAME" ]; then - REF_NAME="main" + REF_NAME="staging" fi REPO="${{ github.repository }}" @@ -204,8 +209,6 @@ jobs: outputs: image_ref: ${{ steps.set-result.outputs.image_ref }} built: ${{ steps.set-result.outputs.built }} - env: - RUNTIME_IMAGE_NAME: ${{ env.RUNTIME_IMAGE_NAME }} steps: - name: Download CI helpers shell: bash @@ -218,7 +221,7 @@ jobs: REF="${{ github.ref_name }}" fi if [ -z "$REF" ]; then - REF="${{ inputs.branch || 'main' }}" + REF="${{ inputs.branch || 'staging' }}" fi URL="https://git.michaelschiemer.de/${{ github.repository }}/raw/${REF}/scripts/ci/clone_repo.sh" mkdir -p /tmp/ci-tools @@ -377,6 +380,12 @@ jobs: echo "TARGET_REGISTRY=$TARGET_REGISTRY" >> $GITHUB_ENV + # Debug: Check if RUNTIME_IMAGE_NAME is set + if [ -z "$RUNTIME_IMAGE_NAME" ]; then + echo "⚠️ RUNTIME_IMAGE_NAME is not set, using default: framework-runtime" + RUNTIME_IMAGE_NAME="framework-runtime" + fi + IMAGE_NAME="$RUNTIME_IMAGE_NAME" echo "🏗️ Building runtime base image..." @@ -431,7 +440,7 @@ jobs: REF="${{ github.ref_name }}" fi if [ -z "$REF" ]; then - REF="${{ inputs.branch || 'main' }}" + REF="${{ inputs.branch || 'staging' }}" fi URL="https://git.michaelschiemer.de/${{ github.repository }}/raw/${REF}/scripts/ci/clone_repo.sh" mkdir -p /tmp/ci-tools @@ -520,7 +529,7 @@ jobs: REF="${{ github.ref_name }}" fi if [ -z "$REF" ]; then - REF="${{ inputs.branch || 'main' }}" + REF="${{ inputs.branch || 'staging' }}" fi URL="https://git.michaelschiemer.de/${{ github.repository }}/raw/${REF}/scripts/ci/clone_repo.sh" mkdir -p /tmp/ci-tools