Interview Prep/Python for DevOps/Testing, CI/CD, packaging & services

Your scheduled audit in GitHub Actions should fail the workflow on critical findings but still upload the report. How do you wire it?

IntermediateScenarioTesting, CI/CD, packaging & services
Answer

Situation read → Need the artifact even when the step fails.

What I'd do →

  1. Give the audit step an id and continue-on-error: true.
  2. Upload the report with actions/upload-artifact@v4 and if: always(); write the Markdown report to $GITHUB_STEP_SUMMARY.
  3. A final step fails the job if steps.audit.outcome == 'failure'.

Why → Separating "run" from "judge" keeps evidence even on failure.

Interview tip → Our lab workflow uses exactly this pattern.

All Python for DevOps questions Roadmap: Python for automation

More on Testing, CI/CD, packaging & services