Optimized for: Gemini / ChatGPT / Claude
Advanced AI Prompt for Multi-Stage Node.js CI/CD Pipelines
Use this engineered prompt to drastically optimize your workflow and output.
Required Variables
- ✦
[NODE_VERSION] - ✦
[TEST_SCRIPT] - ✦
[DEPLOY_TARGET] - ✦
[REGISTRY_URL]
multi-stage-node-js-ci-cd.txt
Act as a Senior DevSecOps Engineer. Architect a production-grade GitHub Actions workflow for a Node.js application running on version [NODE_VERSION]. The workflow must include: 1) Job dependencies to ensure linting and security auditing (npm audit) pass before testing. 2) Execution of [TEST_SCRIPT] with code coverage reporting as a PR comment. 3) A build step that pushes a Docker image to [REGISTRY_URL]. 4) A conditional deployment step to [DEPLOY_TARGET] that only triggers on successful merges to the main branch. Use environment secrets for all sensitive data and implement GitHub Actions caching to minimize build times.
Example Output
"The AI will generate a YAML file featuring distinct jobs for 'lint', 'test', 'build', and 'deploy' with 'needs' keywords and cache-hit logic."