fix(ci): rename run_* inputs to enable_* for Gitea Act forwarding
WDIPL-Runner passed run_build but dropped run_sonar/run_deploy to nested jobs. Use enable_build/enable_sonar/enable_deploy in workflow_call inputs and docs. Made-with: Cursor
This commit is contained in:
@@ -3,15 +3,15 @@ name: Central CI
|
||||
on:
|
||||
workflow_call:
|
||||
inputs:
|
||||
# Gitea Act may lower if: to inputs.* == 'true'. Use string inputs and quoted 'true' in callers,
|
||||
# plus if: that accepts both boolean true and string 'true'.
|
||||
run_build:
|
||||
# Use enable_* (not run_*). WDIPL-Runner / Gitea Act did not forward run_sonar/run_deploy
|
||||
# while run_build worked — likely reserved or buggy names.
|
||||
enable_build:
|
||||
type: string
|
||||
required: true
|
||||
run_sonar:
|
||||
enable_sonar:
|
||||
type: string
|
||||
required: true
|
||||
run_deploy:
|
||||
enable_deploy:
|
||||
type: string
|
||||
required: true
|
||||
wait_for_quality_gate:
|
||||
@@ -90,7 +90,7 @@ jobs:
|
||||
|
||||
# 🔨 BUILD
|
||||
build:
|
||||
if: ${{ inputs.run_build == true || inputs.run_build == 'true' }}
|
||||
if: ${{ inputs.enable_build == true || inputs.enable_build == 'true' }}
|
||||
uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/build.yml@main
|
||||
with:
|
||||
tech_stack: ${{ inputs.tech_stack }}
|
||||
@@ -98,7 +98,7 @@ jobs:
|
||||
|
||||
# 🔍 SONAR
|
||||
sonar:
|
||||
if: ${{ inputs.run_sonar == true || inputs.run_sonar == 'true' }}
|
||||
if: ${{ inputs.enable_sonar == true || inputs.enable_sonar == 'true' }}
|
||||
needs: build
|
||||
uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/quality.yml@main
|
||||
with:
|
||||
@@ -110,7 +110,7 @@ jobs:
|
||||
|
||||
# 🚀 DEPLOY (runs after build; sonar may be skipped)
|
||||
deploy:
|
||||
if: ${{ always() && (inputs.run_deploy == true || inputs.run_deploy == 'true') && needs.build.result == 'success' && (needs.sonar.result == 'success' || needs.sonar.result == 'skipped') }}
|
||||
if: ${{ always() && (inputs.enable_deploy == true || inputs.enable_deploy == 'true') && needs.build.result == 'success' && (needs.sonar.result == 'success' || needs.sonar.result == 'skipped') }}
|
||||
needs: [build, sonar]
|
||||
uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/deploy.yml@main
|
||||
with:
|
||||
|
||||
16
readme.md
16
readme.md
@@ -30,10 +30,10 @@ jobs:
|
||||
with:
|
||||
tech_stack: node
|
||||
|
||||
# run_* flags: use quoted 'true' / 'false' (Gitea Act evaluates inputs.run_* == 'true').
|
||||
run_build: 'true'
|
||||
run_sonar: 'true'
|
||||
run_deploy: 'true'
|
||||
# enable_* flags (not run_* — Act may not forward run_sonar/run_deploy). Quoted for Act.
|
||||
enable_build: 'true'
|
||||
enable_sonar: 'true'
|
||||
enable_deploy: 'true'
|
||||
wait_for_quality_gate: 'false'
|
||||
|
||||
app_path_beta: /var/www/app-beta
|
||||
@@ -119,9 +119,9 @@ jobs:
|
||||
| Variable | What to set |
|
||||
| --------------------- | ---------------------- |
|
||||
| tech_stack | node / react / nestjs |
|
||||
| run_build | `'true'` / `'false'` (quoted) |
|
||||
| run_sonar | `'true'` / `'false'` (quoted) |
|
||||
| run_deploy | `'true'` / `'false'` (quoted) |
|
||||
| enable_build | `'true'` / `'false'` (quoted) |
|
||||
| enable_sonar | `'true'` / `'false'` (quoted) |
|
||||
| enable_deploy | `'true'` / `'false'` (quoted) |
|
||||
| wait_for_quality_gate | `'true'` / `'false'` (quoted) |
|
||||
| app_path_beta | path on beta server |
|
||||
| app_path_staging | path on staging server |
|
||||
@@ -188,7 +188,7 @@ Adjust `proxy_pass` to your Gitea HTTP upstream. Redeploy/reload nginx, then res
|
||||
* Node.js
|
||||
* PM2
|
||||
* Paths must exist on server
|
||||
* Deployment runs only if `run_deploy = true`
|
||||
* Deployment runs only if `enable_deploy = 'true'`
|
||||
|
||||
---
|
||||
|
||||
|
||||
Reference in New Issue
Block a user