/dev Create a GitHub Actions workflow file that runs on pull requests targeting the {{branch-name}} branch. The workflow should:
- Include concurrency controls to cancel outdated workflow runs.
- Restrict permissions to the minimum required.
- Add Timeout Limits to prevent hanging jobs.
- Run on ubuntu-latest.
- Use the latest stable {{runtime}} version.
- Implement dependency caching with a specific cache-dependency-path to minimize execution time
- Combine lint and test into a single ‘verify’ job to reduce setup overhead.
Install Prompt
Add this prompt to your Amazon Q CLI prompt library:
1. Download to local prompt library:
mkdir -p .amazonq/cli-prompts && curl -o .amazonq/cli-prompts/github-actions-pull-request-workflow.md https://promptz.dev/prompts/scaffolding/github-actions-pull-request-workflow/2. Use with Q CLI:
q prompts use github-actions-pull-request-workflow