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
This commit is contained in:
2025-11-02 23:12:18 +01:00
parent 77c656af62
commit 7f3ce7f969

View File

@@ -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