fix(ci): align workflow_call flags, Sonar project_key, and deploy wiring
Made-with: Cursor
This commit is contained in:
@@ -14,6 +14,7 @@ on:
|
||||
required: true
|
||||
wait_for_quality_gate:
|
||||
type: string
|
||||
required: false
|
||||
tech_stack:
|
||||
type: string
|
||||
required: true
|
||||
@@ -40,6 +41,9 @@ on:
|
||||
runtime:
|
||||
type: string
|
||||
required: false
|
||||
pm2_id:
|
||||
type: string
|
||||
required: false
|
||||
|
||||
secrets:
|
||||
SONAR_HOST_URL:
|
||||
@@ -84,7 +88,7 @@ jobs:
|
||||
|
||||
# 🔨 BUILD
|
||||
build:
|
||||
if: inputs.run_build == 'true'
|
||||
if: ${{ inputs.run_build == true || inputs.run_build == 'true' }}
|
||||
uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/build.yml@main
|
||||
with:
|
||||
tech_stack: ${{ inputs.tech_stack }}
|
||||
@@ -92,25 +96,26 @@ jobs:
|
||||
|
||||
# 🔍 SONAR
|
||||
sonar:
|
||||
if: inputs.run_sonar == 'true'
|
||||
if: ${{ inputs.run_sonar == true || inputs.run_sonar == 'true' }}
|
||||
needs: build
|
||||
uses: Rajendra.Reddy/wdipl-actions/.gitea/workflows/quality.yml@main
|
||||
with:
|
||||
project_key: ${{ github.event.repository.name }}
|
||||
wait_for_quality_gate: ${{ inputs.wait_for_quality_gate }}
|
||||
secrets:
|
||||
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
|
||||
# 🚀 DEPLOY
|
||||
# 🚀 DEPLOY (runs after build; sonar may be skipped)
|
||||
deploy:
|
||||
if: inputs.run_deploy == 'true'
|
||||
if: ${{ always() && (inputs.run_deploy == true || inputs.run_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:
|
||||
tech_stack: ${{ inputs.tech_stack }}
|
||||
deploy_command: ${{ inputs.deploy_command }}
|
||||
branch_name: ${{ github.ref_name }}
|
||||
pm2_id: ${{ inputs.pm2_id }}
|
||||
app_path_beta: ${{ inputs.app_path_beta }}
|
||||
app_path_testing: ${{ inputs.app_path_testing }}
|
||||
app_path_staging: ${{ inputs.app_path_staging }}
|
||||
app_path_prod: ${{ inputs.app_path_prod }}
|
||||
secrets:
|
||||
|
||||
@@ -8,7 +8,8 @@ on:
|
||||
required: true
|
||||
wait_for_quality_gate:
|
||||
type: string
|
||||
default: false
|
||||
required: false
|
||||
default: 'false'
|
||||
|
||||
secrets:
|
||||
SONAR_HOST_URL:
|
||||
@@ -37,4 +38,4 @@ jobs:
|
||||
-Dsonar.host.url=${{ secrets.SONAR_HOST_URL }} \
|
||||
-Dsonar.token=${{ secrets.SONAR_TOKEN }} \
|
||||
-Dsonar.exclusions=node_modules/**,dist/**,coverage/** \
|
||||
-Dsonar.qualitygate.wait=${{ inputs.wait_for_quality_gate }}
|
||||
-Dsonar.qualitygate.wait=${{ inputs.wait_for_quality_gate == true || inputs.wait_for_quality_gate == 'true' }}
|
||||
@@ -30,10 +30,11 @@ jobs:
|
||||
with:
|
||||
tech_stack: node
|
||||
|
||||
# run_* flags: use YAML `true`/`false` or "true"/"false" — central workflow treats both.
|
||||
run_build: true
|
||||
run_sonar: true
|
||||
run_deploy: true
|
||||
wait_for_quality_gate: false
|
||||
wait_for_quality_gate: 'false'
|
||||
|
||||
app_path_beta: /var/www/app-beta
|
||||
app_path_staging: /var/www/app-staging
|
||||
|
||||
Reference in New Issue
Block a user