diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index ad1b0cc..049e326 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -3,14 +3,17 @@ name: Central CI on: workflow_call: inputs: + # Use boolean (not string). Callers must pass YAML true/false — not "true" in quotes. + # With type: string, Gitea/Act often mis-coerces multiple YAML booleans; build could look + # "true" in logs while run_sonar / run_deploy arrive empty or false. run_build: - type: string + type: boolean required: true run_sonar: - type: string + type: boolean required: true run_deploy: - type: string + type: boolean required: true wait_for_quality_gate: type: string @@ -88,7 +91,7 @@ jobs: # 🔨 BUILD build: - if: ${{ inputs.run_build == true || inputs.run_build == 'true' }} + if: ${{ inputs.run_build }} uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/build.yml@main with: tech_stack: ${{ inputs.tech_stack }} @@ -96,7 +99,7 @@ jobs: # 🔍 SONAR sonar: - if: ${{ inputs.run_sonar == true || inputs.run_sonar == 'true' }} + if: ${{ inputs.run_sonar }} needs: build uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/quality.yml@main with: @@ -108,7 +111,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.run_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 d2eba9c..ed6dbb2 100644 --- a/readme.md +++ b/readme.md @@ -30,7 +30,9 @@ jobs: with: tech_stack: node - # run_* flags: use YAML `true`/`false` or "true"/"false" — central workflow treats both. + # run_* flags: YAML true/false only (central workflow uses type: boolean). + # If Sonar/Deploy were skipped while Build ran, you likely had type:string + bad coercion; + # ensure these keys sit under `with:` (not `secrets:`) and names are run_sonar / run_deploy. run_build: true run_sonar: true run_deploy: true