Hithomelabs/CFTunnels#139: Remove workflow_dispatch inputs for Gitea 1.22.x compat
All checks were successful
sample gradle build and test / build (pull_request) Successful in 1m53s
All checks were successful
sample gradle build and test / build (pull_request) Successful in 1m53s
This commit is contained in:
parent
bf5c9f1650
commit
c9dea2a91d
@ -7,15 +7,6 @@ on:
|
||||
- test # → PATCH bump, build & tag as test
|
||||
- main # → MINOR bump, promote test→prod
|
||||
workflow_dispatch:
|
||||
inputs:
|
||||
environment:
|
||||
description: 'Target environment (test → PATCH bump, prod → MINOR bump)'
|
||||
required: true
|
||||
default: 'test'
|
||||
type: choice
|
||||
options:
|
||||
- test
|
||||
- prod
|
||||
|
||||
jobs:
|
||||
version:
|
||||
@ -31,15 +22,9 @@ jobs:
|
||||
- name: Determine environment
|
||||
id: env
|
||||
run: |
|
||||
if [[ "${{ github.event_name }}" == "workflow_dispatch" ]]; then
|
||||
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
|
||||
[[ "${{ github.ref_name }}" == "main" ]] && ENV="prod" || ENV="${{ github.ref_name }}"
|
||||
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
|
||||
fi
|
||||
echo "target_env=$ENV" >> $GITHUB_OUTPUT
|
||||
|
||||
Loading…
Reference in New Issue
Block a user