Compare commits

...

2 Commits

Author SHA1 Message Date
0df22454a3 Hithomelabs/CFTunnels#149: Resolve merge conflicts by removing workflow_dispatch inputs and simplifying env step
Some checks failed
sample gradle build and test / build (pull_request) Successful in 1m51s
Build & Push Portainer Automation / version (push) Successful in 7s
sample gradle build and test / tag (push) Successful in 7s
Build & Push Portainer Automation / build-and-push (push) Successful in 1m55s
sample gradle build and test / build_tag_push (push) Failing after 28s
2026-07-09 11:34:53 +05:30
c9dea2a91d 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
2026-07-09 05:44:05 +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