chore(ci): add final end-of-run pipeline summary
Add a final always-run summary job that prints build, sonar, and deploy results in both logs and GITHUB_STEP_SUMMARY for quick visibility. Made-with: Cursor
This commit is contained in:
@@ -141,3 +141,29 @@ jobs:
|
||||
PROD_SERVER_USERNAME: ${{ secrets.PROD_SERVER_USERNAME }}
|
||||
PROD_SERVER_PASSWORD: ${{ secrets.PROD_SERVER_PASSWORD }}
|
||||
PROD_SERVER_KEY: ${{ secrets.PROD_SERVER_KEY }}
|
||||
|
||||
summary:
|
||||
if: ${{ always() }}
|
||||
needs: [build, sonar, deploy]
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Print final pipeline summary
|
||||
run: |
|
||||
echo "================ PIPELINE SUMMARY ================"
|
||||
echo "ci_steps: ${{ inputs.ci_steps }}"
|
||||
echo "build: ${{ needs.build.result }}"
|
||||
echo "sonar: ${{ needs.sonar.result }}"
|
||||
echo "deploy: ${{ needs.deploy.result }}"
|
||||
echo "=================================================="
|
||||
|
||||
{
|
||||
echo "## Pipeline Summary"
|
||||
echo ""
|
||||
echo "| Stage | Result |"
|
||||
echo "|---|---|"
|
||||
echo "| Build | ${{ needs.build.result }} |"
|
||||
echo "| Sonar | ${{ needs.sonar.result }} |"
|
||||
echo "| Deploy | ${{ needs.deploy.result }} |"
|
||||
echo ""
|
||||
echo "**ci_steps:** \`${{ inputs.ci_steps }}\`"
|
||||
} >> "$GITHUB_STEP_SUMMARY"
|
||||
|
||||
Reference in New Issue
Block a user