diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index f202122..4810657 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -3,15 +3,10 @@ name: Central CI on: workflow_call: inputs: - # 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 - enable_sonar: - type: string - required: true - enable_deploy: + # WDIPL-Runner v0.2.12: only the first truthy workflow_call flag reached nested jobs; the rest + # were empty. Use ONE comma-separated input so Act forwards a single string with all steps. + # Tokens: build, sonar, deploy (e.g. "build,sonar,deploy" or "build" only). + ci_steps: type: string required: true wait_for_quality_gate: @@ -90,7 +85,7 @@ jobs: # 🔨 BUILD build: - if: ${{ inputs.enable_build == true || inputs.enable_build == 'true' }} + if: ${{ contains(format(',{0},', replace(inputs.ci_steps, ' ', '')), ',build,') }} uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/build.yml@main with: tech_stack: ${{ inputs.tech_stack }} @@ -98,7 +93,7 @@ jobs: # 🔍 SONAR sonar: - if: ${{ inputs.enable_sonar == true || inputs.enable_sonar == 'true' }} + if: ${{ contains(format(',{0},', replace(inputs.ci_steps, ' ', '')), ',sonar,') }} needs: build uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/quality.yml@main with: @@ -110,7 +105,7 @@ jobs: # 🚀 DEPLOY (runs after build; sonar may be skipped) deploy: - if: ${{ always() && (inputs.enable_deploy == true || inputs.enable_deploy == 'true') && needs.build.result == 'success' && (needs.sonar.result == 'success' || needs.sonar.result == 'skipped') }} + if: ${{ always() && contains(format(',{0},', replace(inputs.ci_steps, ' ', '')), ',deploy,') && 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: diff --git a/readme.md b/readme.md index eb7c355..fd52125 100644 --- a/readme.md +++ b/readme.md @@ -30,10 +30,8 @@ jobs: with: tech_stack: node - # enable_* flags (not run_* — Act may not forward run_sonar/run_deploy). Quoted for Act. - enable_build: 'true' - enable_sonar: 'true' - enable_deploy: 'true' + # Comma-separated: build, sonar, deploy (WDIPL-Runner only forwards one “flag” string reliably). + ci_steps: 'build,sonar,deploy' wait_for_quality_gate: 'false' app_path_beta: /var/www/app-beta @@ -119,9 +117,7 @@ jobs: | Variable | What to set | | --------------------- | ---------------------- | | tech_stack | node / react / nestjs | -| enable_build | `'true'` / `'false'` (quoted) | -| enable_sonar | `'true'` / `'false'` (quoted) | -| enable_deploy | `'true'` / `'false'` (quoted) | +| ci_steps | e.g. `build,sonar,deploy` or `build` only | | wait_for_quality_gate | `'true'` / `'false'` (quoted) | | app_path_beta | path on beta server | | app_path_staging | path on staging server | @@ -188,7 +184,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 `enable_deploy = 'true'` +* Deployment runs only if `ci_steps` includes `deploy` (comma‑bounded token) ---