[ISSUE-139] Remove workflow_dispatch inputs for Gitea 1.22.x compatibility #149

Merged
hitanshu merged 2 commits from Dave/CFTunnels:ISSUE-139-remove-inputs into test 2026-07-09 06:15:28 +00:00

View File

@ -7,12 +7,6 @@ on:
- test # → PATCH bump, build & tag as test - test # → PATCH bump, build & tag as test
- main # → MINOR bump, promote test→prod - main # → MINOR bump, promote test→prod
workflow_dispatch: workflow_dispatch:
inputs:
environment:
description: 'Target environment: "test" (PATCH bump) or "prod" (MINOR bump). Invalid values fail early with validation error.'
required: true
default: 'test'
type: string
jobs: jobs:
version: version:
@ -28,15 +22,9 @@ jobs:
- name: Determine environment - name: Determine environment
id: env id: env
run: | run: |
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then [[ "${{ github.ref_name }}" == "main" ]] && ENV="prod" || ENV="${{ github.ref_name }}"
ENV="${{ inputs.environment }}"
else
# Push events: test branch → test env, main branch → prod env
[[ "${{ github.ref_name }}" == "main" ]] && ENV="prod" || ENV="${{ github.ref_name }}"
fi
# Validate
if [[ "$ENV" != "test" && "$ENV" != "prod" ]]; then if [[ "$ENV" != "test" && "$ENV" != "prod" ]]; then
echo " Invalid environment: $ENV. Must be 'test' or 'prod'." echo "✦ Invalid environment: $ENV. Must be 'test' or 'prod'."
exit 1 exit 1
fi fi
echo "target_env=$ENV" >> $GITHUB_OUTPUT echo "target_env=$ENV" >> $GITHUB_OUTPUT