Github Actions Templates
Unverified●30/40Claude Code◐PartialHas SKILL.md but declares no allowed-tools — Claude Code will ask for permission each time
Cursor◐PartialPlain prose you can paste in — but no Cursor rules file
Codex◐PartialPlain prose you can paste in — but no AGENTS.md
Gemini CLI◐PartialPlain prose you can paste in
Copilot◐PartialPlain prose you can paste in — but no Copilot instructions file
npx agentalley add github-actions-templatesWho is stuck, and on what
Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates.
The whole source
Frontmatter — 2 properties
| name | github-actions-templates |
|---|---|
| description | Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates. |
| 1 | --- |
| 2 | name: github-actions-templates |
| 3 | description: Create production-ready GitHub Actions workflows for automated testing, building, and deploying applications. Use when setting up CI/CD with GitHub Actions, automating development workflows, or creating reusable workflow templates. |
| 4 | ---A5 — No allowed-tools declared — no way to tell what this skill may touch |
| 5 | |
| 6 | # GitHub Actions Templates |
| 7 | |
| 8 | Production-ready GitHub Actions workflow patterns for testing, building, and deploying applications. |
| 9 | |
| 10 | ## Purpose |
| 11 | |
| 12 | Create efficient, secure GitHub Actions workflows for continuous integration and deployment across various tech stacks. |
| 13 | |
| 14 | ## When to Use |
| 15 | |
| 16 | - Automate testing and deployment |
| 17 | - Build Docker images and push to registries |
| 18 | - Deploy to Kubernetes clusters |
| 19 | - Run security scans |
| 20 | - Implement matrix builds for multiple environments |
| 21 | |
| 22 | ## Common Workflow Patterns |
| 23 | |
| 24 | ### Pattern 1: Test Workflow |
| 25 | |
| 26 | ```yaml |
| 27 | name: Test |
| 28 | |
| 29 | on: |
| 30 | push: |
| 31 | branches: [main, develop] |
| 32 | pull_request: |
| 33 | branches: [main] |
| 34 | |
| 35 | jobs: |
| 36 | test: |
| 37 | runs-on: ubuntu-latest |
| 38 | |
| 39 | strategy: |
| 40 | matrix: |
| 41 | node-version: [18.x, 20.x] |
| 42 | |
| 43 | steps: |
| 44 | - uses: actions/checkout@v4 |
| 45 | |
| 46 | - name: Use Node.js ${{ matrix.node-version }} |
| 47 | uses: actions/setup-node@v4 |
| 48 | with: |
| 49 | node-version: ${{ matrix.node-version }} |
| 50 | cache: "npm" |
| 51 | |
| 52 | - name: Install dependencies |
| 53 | run: npm ci |
| 54 | |
| 55 | - name: Run linter |
| 56 | run: npm run lint |
| 57 | |
| 58 | - name: Run tests |
| 59 | run: npm test |
| 60 | |
| 61 | - name: Upload coverage |
| 62 | uses: codecov/codecov-action@v4 |
| 63 | with: |
| 64 | files: ./coverage/lcov.info |
| 65 | ``` |
| 66 | |
| 67 | **Reference:** See `assets/test-workflow.yml` |
| 68 | |
| 69 | ### Pattern 2: Build and Push Docker Image |
| 70 | |
| 71 | ```yaml |
| 72 | name: Build and Push |
| 73 | |
| 74 | on: |
| 75 | push: |
| 76 | branches: [main] |
| 77 | tags: ["v*"] |
| 78 | |
| 79 | env: |
| 80 | REGISTRY: ghcr.io |
| 81 | IMAGE_NAME: ${{ github.repository }} |
| 82 | |
| 83 | jobs: |
| 84 | build: |
| 85 | runs-on: ubuntu-latest |
| 86 | permissions: |
| 87 | contents: read |
| 88 | packages: write |
| 89 | |
| 90 | steps: |
| 91 | - uses: actions/checkout@v4 |
| 92 | |
| 93 | - name: Log in to Container Registry |
| 94 | uses: docker/login-action@v3 |
| 95 | with: |
| 96 | registry: ${{ env.REGISTRY }} |
| 97 | username: ${{ github.actor }} |
| 98 | password: ${{ secrets.GITHUB_TOKEN }} |
| 99 | |
| 100 | - name: Extract metadata |
| 101 | id: meta |
| 102 | uses: docker/metadata-action@v5 |
| 103 | with: |
| 104 | images: ${{ env.REGISTRY }}/${{ env.IMAGE_NAME }} |
| 105 | tags: | |
| 106 | type=ref,event=branch |
| 107 | type=ref,event=pr |
| 108 | type=semver,pattern={{version}} |
| 109 | type=semver,pattern={{major}}.{{minor}} |
| 110 | |
| 111 | - name: Build and push |
| 112 | uses: docker/build-push-action@v5 |
| 113 | with: |
| 114 | context: . |
| 115 | push: true |
| 116 | tags: ${{ steps.meta.outputs.tags }} |
| 117 | labels: ${{ steps.meta.outputs.labels }} |
| 118 | cache-from: type=gha |
| 119 | cache-to: type=gha,mode=max |
| 120 | ``` |
| 121 | |
| 122 | **Reference:** See `assets/deploy-workflow.yml` |
| 123 | |
| 124 | ### Pattern 3: Deploy to Kubernetes |
| 125 | |
| 126 | ```yaml |
| 127 | name: Deploy to Kubernetes |
| 128 | |
| 129 | on: |
| 130 | push: |
| 131 | branches: [main] |
| 132 | |
| 133 | jobs: |
| 134 | deploy: |
| 135 | runs-on: ubuntu-latest |
| 136 | |
| 137 | steps: |
| 138 | - uses: actions/checkout@v4 |
| 139 | |
| 140 | - name: Configure AWS credentials |
| 141 | uses: aws-actions/configure-aws-credentials@v4 |
| 142 | with: |
| 143 | aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }} |
| 144 | aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }} |
| 145 | aws-region: us-west-2 |
| 146 | |
| 147 | - name: Update kubeconfig |
| 148 | run: | |
| 149 | aws eks update-kubeconfig --name production-cluster --region us-west-2 |
| 150 | |
| 151 | - name: Deploy to Kubernetes |
| 152 | run: | |
| 153 | kubectl apply -f k8s/ |
| 154 | kubectl rollout status deployment/my-app -n production |
| 155 | kubectl get services -n production |
| 156 | |
| 157 | - name: Verify deployment |
| 158 | run: | |
| 159 | kubectl get pods -n production |
| 160 | kubectl describe deployment my-app -n production |
| 161 | ``` |
| 162 | |
| 163 | ### Pattern 4: Matrix Build |
| 164 | |
| 165 | ```yaml |
| 166 | name: Matrix Build |
| 167 | |
| 168 | on: [push, pull_request] |
| 169 | |
| 170 | jobs: |
| 171 | build: |
| 172 | runs-on: ${{ matrix.os }} |
| 173 | |
| 174 | strategy: |
| 175 | matrix: |
| 176 | os: [ubuntu-latest, macos-latest, windows-latest] |
| 177 | python-version: ["3.9", "3.10", "3.11", "3.12"] |
| 178 | |
| 179 | steps: |
| 180 | - uses: actions/checkout@v4 |
| 181 | |
| 182 | - name: Set up Python |
| 183 | uses: actions/setup-python@v5 |
| 184 | with: |
| 185 | python-version: ${{ matrix.python-version }} |
| 186 | |
| 187 | - name: Install dependencies |
| 188 | run: | |
| 189 | python -m pip install --upgrade pip |
| 190 | pip install -r requirements.txt |
| 191 | |
| 192 | - name: Run tests |
| 193 | run: pytest |
| 194 | ``` |
| 195 | |
| 196 | **Reference:** See `assets/matrix-build.yml` |
| 197 | |
| 198 | ## Workflow Best Practices |
| 199 | |
| 200 | 1. **Use specific action versions** (@v4, not @latest) |
| 201 | 2. **Cache dependencies** to speed up builds |
| 202 | 3. **Use secrets** for sensitive data |
| 203 | 4. **Implement status checks** on PRs |
| 204 | 5. **Use matrix builds** for multi-version testing |
| 205 | 6. **Set appropriate permissions** |
| 206 | 7. **Use reusable workflows** for common patterns |
| 207 | 8. **Implement approval gates** for production |
| 208 | 9. **Add notification steps** for failures |
| 209 | 10. **Use self-hosted runners** for sensitive workloads |
| 210 | |
| 211 | ## Reusable Workflows |
| 212 | |
| 213 | ```yaml |
| 214 | # .github/workflows/reusable-test.yml |
| 215 | name: Reusable Test Workflow |
| 216 | |
| 217 | on: |
| 218 | workflow_call: |
| 219 | inputs: |
| 220 | node-version: |
| 221 | required: true |
| 222 | type: string |
| 223 | secrets: |
| 224 | NPM_TOKEN: |
| 225 | required: true |
| 226 | |
| 227 | jobs: |
| 228 | test: |
| 229 | runs-on: ubuntu-latest |
| 230 | steps: |
| 231 | - uses: actions/checkout@v4 |
| 232 | - uses: actions/setup-node@v4 |
| 233 | with: |
| 234 | node-version: ${{ inputs.node-version }} |
| 235 | - run: npm ci |
| 236 | - run: npm test |
| 237 | ``` |
| 238 | |
| 239 | **Use reusable workflow:** |
| 240 | |
| 241 | ```yaml |
| 242 | jobs: |
| 243 | call-test: |
| 244 | uses: ./.github/workflows/reusable-test.yml |
| 245 | with: |
| 246 | node-version: "20.x" |
| 247 | secrets: |
| 248 | NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |
| 249 | ``` |
| 250 | |
| 251 | ## Security Scanning |
| 252 | |
| 253 | ```yaml |
| 254 | name: Security Scan |
| 255 | |
| 256 | on: |
| 257 | push: |
| 258 | branches: [main] |
| 259 | pull_request: |
| 260 | branches: [main] |
| 261 | |
| 262 | jobs: |
| 263 | security: |
| 264 | runs-on: ubuntu-latest |
| 265 | |
| 266 | steps: |
| 267 | - uses: actions/checkout@v4 |
| 268 | |
| 269 | - name: Run Trivy vulnerability scanner |
| 270 | uses: aquasecurity/trivy-action@0.28.0 |
| 271 | with: |
| 272 | scan-type: "fs" |
| 273 | scan-ref: "." |
| 274 | format: "sarif" |
| 275 | output: "trivy-results.sarif" |
| 276 | |
| 277 | - name: Upload Trivy results to GitHub Security |
| 278 | uses: github/codeql-action/upload-sarif@v3 |
| 279 | with: |
| 280 | sarif_file: "trivy-results.sarif" |
| 281 | |
| 282 | - name: Run Snyk Security Scan |
| 283 | uses: snyk/actions/node@0.4.0 |
| 284 | env: |
| 285 | SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }} |
| 286 | ``` |
| 287 | |
| 288 | ## Deployment with Approvals |
| 289 | |
| 290 | ```yaml |
| 291 | name: Deploy to Production |
| 292 | |
| 293 | on: |
| 294 | push: |
| 295 | tags: ["v*"] |
| 296 | |
| 297 | jobs: |
| 298 | deploy: |
| 299 | runs-on: ubuntu-latest |
| 300 | environment: |
| 301 | name: production |
| 302 | url: https://app.example.com |
| 303 | |
| 304 | steps: |
| 305 | - uses: actions/checkout@v4 |
| 306 | |
| 307 | - name: Deploy application |
| 308 | run: | |
| 309 | echo "Deploying to production..." |
| 310 | # Deployment commands here |
| 311 | |
| 312 | - name: Notify Slack |
| 313 | if: success() |
| 314 | uses: slackapi/slack-github-action@v1 |
| 315 | with: |
| 316 | webhook-url: ${{ secrets.SLACK_WEBHOOK }} |
| 317 | payload: | |
| 318 | { |
| 319 | "text": "Deployment to production completed successfully!" |
| 320 | } |
| 321 | ``` |
| 322 | |
| 323 | |
| 324 | ## Related Skills |
| 325 | |
| 326 | - `gitlab-ci-patterns` - For GitLab CI workflows |
| 327 | - `deployment-pipeline-design` - For pipeline architecture |
| 328 | - `secrets-management` - For secrets handling |
| 329 |
Reviews
Installed this one?Write the first review and take the Trailblazer badge.
Alternatives
Paper Poster (HTML): measurement-gated poster generationDEFAULT poster pipeline — build an academic conference poster (ICML/NeurIPS/ICLR/CVPR/...) as a single HTML/CSS file with measurement-driven hard gates, real paper figures, a two-hue design-token system, and print-ready PDF via headless Chromium. Use when the●····●36/40Brand Monitoring 📡Brand monitoring tool for tracking mentions across social media platforms. Monitor Reddit, Google News, YouTube, and DuckDuckGo for brand mentions. Includes sentiment analysis, trend tracking, crisis detection, and competitor comparison. No API key required fo◐····●34/40Spark Memory & Thermal OpsManage unified memory and thermals during long-running ML jobs on NVIDIA DGX Spark. Use when planning memory headroom for a training run on GB10, when a job OOMs on unified memory, or when monitoring temperature and power during multi-hour training.◐····●32/40Secrets ManagementImplement secure secrets management for CI/CD pipelines using Vault, AWS Secrets Manager, or native platform solutions. Use when handling sensitive credentials, rotating secrets, or securing CI/CD environments.◐····●32/40