Skip to content
Skills Library
DevOps & cloud · Automation

github-actions

/github-actions

GitHub Actions CI/CD. Covers workflows, jobs, and deployment. Use for automating builds, tests, and deployments. USE WHEN: user mentions "github actions", "workflow", "ci/cd", ".github/workflows", "actions/checkout", "github workflow", asks about "automate tests", "deploy on push", "build pipeline", "ci pipeline", "continuous integration", "github automation" DO NOT USE FOR: GitLab CI/CD - different syntax and features, Jenkins pipelines - different tool, Container orchestration - use `docker` or `kubernetes` skills, Local builds - workflows run on GitHub runners

Licence
MIT
Last repository change
21.10.2026

Assessment and security

100/ 100Class: good
Format25 / 25
Frontmatter with name and description, valid name, description up to 1,024 characters, name matching the folder.
Discoverability25 / 25
Description explains when to use the skill, has a reasonable length and uses third person.
Content35 / 35
At least 150 words and at most 500 lines, headings, step lists, examples or code.
Hygiene15 / 15
No placeholders such as TODO, no Windows paths, with a licence.
Riskno signals detected in the scan
Files in this package
3
Scripts
0
HTML comments
0
URLs in SKILL.md
1
Deprecation

No signals detected. Repository changed on 21.10.2026, without references to retired models or APIs.

Licence

MIT, open: use and modify while retaining author attribution.

What it does and when to use it

GitHub Actions CI/CD. Covers workflows, jobs, and deployment. Use for automating builds, tests, and deployments. USE WHEN: user mentions "github actions", "workflow", "ci/cd", ".github/workflows", "actions/checkout", "github workflow", asks about "automate tests", "deploy on push", "build pipeline", "ci pipeline", "continuous integration", "github automation" DO NOT USE FOR: GitLab CI/CD - different syntax and features, Jenkins pipelines - different tool, Container orchestration - use `docker` or `kubernetes` skills, Local builds - workflows run on GitHub runners

Triggers from the description

github actionsworkflowci/cd.github/workflowsactions/checkoutgithub workflowautomate testsdeploy on push
Original author description

GitHub Actions CI/CD. Covers workflows, jobs, and deployment. Use for automating builds, tests, and deployments. USE WHEN: user mentions "github actions", "workflow", "ci/cd", ".github/workflows", "actions/checkout", "github workflow", asks about "automate tests", "deploy on push", "build pipeline", "ci pipeline", "continuous integration", "github automation" DO NOT USE FOR: GitLab CI/CD - different syntax and features, Jenkins pipelines - different tool, Container orchestration - use `docker` or `kubernetes` skills, Local builds - workflows run on GitHub runners

How it works

  1. Basic CI Workflow
  2. With Database
  3. Deploy Workflow
  4. Matrix Strategy
  5. Reusable Workflows
  6. When NOT to Use This Skill
  7. Anti-Patterns
  8. Quick Troubleshooting
  9. Production Readiness
  10. Reference Documentation
Original SKILL.md headings · 404 lines, 1,105 words
SKILL.md preview
---
name: github-actions
description: |
  GitHub Actions CI/CD. Covers workflows, jobs, and deployment.
  Use for automating builds, tests, and deployments.

  USE WHEN: user mentions "github actions", "workflow", "ci/cd", ".github/workflows",
  "actions/checkout", "github workflow", asks about "automate tests", "deploy on push",
  "build pipeline", "ci pipeline", "continuous integration", "github automation"

  DO NOT USE FOR: GitLab CI/CD - different syntax and features,
  Jenkins pipelines - different tool,
  Container orchestration - use `docker` or `kubernetes` skills,
  Local builds - workflows run on GitHub runners
allowed-tools: Read, Grep, Glob, Write, Edit
---
# GitHub Actions Core Knowledge

> **Deep Knowledge**: Use `mcp__documentation__fetch_docs` with technology: `github-actions` for comprehensive documentation.

## Basic CI Workflow

```yaml
# .github/workflows/ci.yml
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run linter
        run: npm run lint

      - name: Run tests
        run: npm test

      - name: Build
        run: npm run build
```

## With Database

```yaml
jobs:
  test:
    runs-on: ubuntu-latest

    services:
      postgres:
        image: postgres:16
        env:
          POSTGRES_USER: test
          POSTGRES_PASSWORD: test
          POSTGRES_DB: testdb
        ports:
          - 5432:5432
        options: >-
          --health-cmd pg_isready
          --health-interval 10s
          --health-timeout 5s
          --health-retries 5

    env:
      DATABASE_URL: postgresql://test:test@localhost:5432/testdb

    steps:
      - uses: actions/checkout@v4
      - run: npm ci
      - run: npx prisma migrate deploy
      - run: npm test
```

## Deploy Workflow

```yaml
name: Deploy

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Deploy to Vercel
        uses: amondnet/vercel-action@v25
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          vercel-args: '--prod'
```

## Matrix Strategy

```yaml
jobs:
  test:
    strategy:
      matrix:
        node: [18, 20, 22]
        os: [ubuntu-latest, macos-latest]
    runs-on: ${{ matrix.os }}
    steps:
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node }}
```

## Reusable Workflows

```yaml
# .github/workflows/test.yml
on:
  workflow_call:

jobs:
  test:
    runs-on: ubuntu-latest
    steps: [...]

# Usage in another workflow
jobs:
  call-tests:
    uses: ./.github/workflows/test.yml
```

## When NOT to Use This Skill

Skip this skill when:
- Using GitLab CI/CD (.gitlab-ci.yml) - different syntax
- Using Jenkins, CircleCI, Travis CI - different platforms
- Setting up local development environments - use `docker-compose` skill
- Building Docker images only (no CI needed) - use `docker` skill
- Working with Bitbucket Pipelines - different platform

## Anti-Patterns

| Anti-Pattern | Problem | Solution |
|--------------|---------|----------|
| No permission restrictions | Security risk, excessive access | Set minimal `permissions:` per job |
| Using action tags like `@v1` | Breaking changes on updates | Pin to SHA: `@60edb5dd545a775178f52524783378180af0d1f8` |
| Secrets in logs | Credential exposure | Never `echo` secrets, use `env:` only |
| No timeout set | Runaway jobs consuming minutes | Set `timeout-minutes: 15` on jobs |
| Caching nothing | Slow builds, wasted time | Cache dependencies with `actions/cache` |
| Running on every commit | Wasted CI minutes | Use `paths:` filters or `pull_request:` only |
| Hardcoded versions | Inconsistent environments | Use matrix strategy or env vars |
| No artifact retention limit | High storage costs | Set `retention-days: 7` on artifacts |
| Storing secrets in code | Security breach | Use GitHub Secrets, never commit |
| No branch protection | Bypassing CI checks | Require status checks in branch rules |

## Quick Troubleshooting

| Issue | Diagnosis | Fix |
|-------|-----------|-----|
| Workflow doesn't trigger | Wrong event, branch filter | Check `on:` triggers and branch names |
| Job fails silently | Script errors ignored | Don't use `|| true`, check exit codes |
| Cache never hits | Cache key changing | Use stable keys: `hashFiles('**/package-lock.json')` |
| "Resource not accessible" | Wrong permissions | Add required `permissions:` to job |
| Secrets not available in PR | Forks don't have access | Use `pull_request_target` (carefully) or skip secret steps |
| Artifact upload fails | Path doesn't exist | Check build output path, use `if: always()` |
| Matrix job failures | One config fails all | Use `fail-fast: false` to continue other jobs |
| Workflow takes too long | No caching, sequential jobs | Add caching, parallelize with `needs:` |
| "Context access might be invalid" | Wrong context syntax | Use `${{ }}` syntax, check context availability |
| Can't trigger another workflow | No token permission | Use PAT or `GITHUB_TOKEN` with write permissions |

## Production Readiness

### Security Best Practices

```yaml
# Secure workflow
name: CI

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]

permissions:
  contents: read
  pull-requests: write

jobs:
  build:
    runs-on: ubuntu-latest
    timeout-minutes: 15

    steps:
      - uses: actions/checkout@v4
        with:
          persist-credentials: false

      # Pin actions to SHA for security
      - uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
        with:
          node-version: '20'

      # Use environment secrets
      - name: Deploy
        env:
          API_KEY: ${{ secrets.API_KEY }}
        run: |
          # Never echo secrets
          ./deploy.sh
```

### Caching Strategy

```yaml
jobs:
  build:
    steps:
      - uses: actions/checkout@v4

      - uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      # Custom caching
      - name: Cache dependencies
        uses: actions/cache@v4
        with:
          path: |
            ~/.npm
            node_modules
          key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
          restore-keys: |
            ${{ runner.os }}-node-

      # Turbo cache for monorepos
      - name: Cache Turbo
        uses: actions/cache@v4
        with:
          path: .turbo
          key: ${{ runner.os }}-turbo-${{ github.sha }}
          restore-keys: |
            ${{ runner.os }}-turbo-
```

### Artifact Management

```yaml
jobs:
  build:
    steps:
      - name: Build
        run: npm run build

      - name: Upload build artifacts
        uses: actions/upload-artifact@v4
        with:
          name: build-${{ github.sha }}
          path: dist/
          retention-days: 7

  deploy:
    needs: build
    steps:
      - name: Download artifacts
        uses: actions/download-artifact@v4
        with:
          name: build-${{ github.sha }}
          path: dist/
```

### Environment Protection

```yaml
jobs:
  deploy-staging:
    runs-on: ubuntu-latest
    environment: staging

  deploy-production:
    runs-on: ubuntu-latest
    needs: deploy-staging
    environment:
      name: production
      url: https://example.com
    concurrency:
      group: production-deploy
      cancel-in-progress: false
```

### Error Handling

```yaml
jobs:
  build:
    steps:
      - name: Run tests
        id: tests
        continue-on-error: true
        run: npm test

      - name: Upload test results
        if: always()
        uses: actions/upload-artifact@v4
        with:
          name: test-results
          path: coverage/

      - name: Check test status
        if: steps.tests.outcome == 'failure'
        run: |
          echo "Tests failed"
          exit 1

      - name: Notify on failure
        if: failure()
        uses: slackapi/slack-github-action@v1
        with:
          payload: |
            {"text": "Build failed: ${{ github.repository }}"}
        env:
          SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }}
```

### Dependabot Configuration

```yaml
# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    groups:
      development-dependencies:
        patterns:
          - "@types/*"
          - "eslint*"
          - "prettier*"

  - package-ecosystem: "github-actions"
    directory: "/"
    schedule:
      interval: "weekly"
```

### Release Workflow

```yaml
name: Release

on:
  push:
    tags:
      - 'v*'

jobs:
  release:
    runs-on: ubuntu-latest
    permissions:
      contents: write

    steps:
      - uses: actions/checkout@v4

      - name: Build
        run: npm run build

      - name: Create Release
        uses: softprops/action-gh-release@v2
        with:
          files: dist/*
          generate_release_notes: true
```

### Monitoring Metrics

| Metric | Target |
|--------|--------|
| Build success rate | > 95% |
| Build duration | < 10min |
| Cache hit rate | > 80% |
| Deployment frequency | As needed |

### Checklist

- [ ] Minimal permissions declared
- [ ] Actions pinned to SHA
- [ ] Secrets not exposed in logs
- [ ] Caching configured
- [ ] Timeouts set
- [ ] Error notifications
- [ ] Environment protection rules
- [ ] Dependabot enabled
- [ ] Branch protection rules
- [ ] Concurrency controls

## Reference Documentation
- [Caching](quick-ref/caching.md)
- [Secrets](quick-ref/secrets.md)
Files in this package (3)
  • SKILL.md 10 KB
  • quick-ref/actions.md 5 KB
  • quick-ref/workflows.md 5 KB

Versions

RepositoryScoreLicence
This page · claude-dev-suite/claude-dev-suite100MIT
ericrisco/rsc-harness100MIT
lamberto15/turboship100MIT
TerminalSkills/skills100Apache-2.0
jelvodev/yaap100MIT
tddworks/claudebar100Apache-2.0
OpenHands/extensions100MIT
tartinerlabs/skills100MIT
meyshad/skillforge100MIT

Database snapshot: 13.11.2026 · package version 1c98b48007e1 (SHA-256 digest of the entire package)

Downloads in the last 30 days: 0 · ranking

Report a problem with this skill: harmful content, incorrect descriptions or an author’s removal request.

Similar skills

  • 100cicd-expert
    Expert-level CI/CD with GitHub Actions, Jenkins, deployment pipelines, and automation. Use when the user mentions CI/CD, GitHub Actions, Jenkins, GitLab CI, deployment, or automation, or when the task involves CI/CD Fundamentals, Pipeline Design, Workflow Basics, or Docker Build and Push.
  • 95memstack-deployment-ci-cd-pipeline
    Use this skill when the user says 'CI/CD', 'GitHub Actions', 'pipeline', 'continuous integration', 'continuous deployment', 'ci-cd-pipeline', 'automate deploys', or needs to set up automated build, test, and deployment pipelines. Do NOT use for one-time manual deployments.
  • 100ci-cd-github-actions-workflows
    Use this skill when creating automated continuous integration, matrix builds, and continuous deployment workflows with GitHub Actions.
  • 100ci-cd-pipeline
    Use when designing, debugging, or fixing CI/CD pipelines — GitHub Actions, GitLab CI, Jenkins
  • 100github-actions-pipeline-builder
    Build production CI/CD pipelines with GitHub Actions. Implements matrix builds, caching, deployments, testing, security scanning. Use for automated testing, deployments, release workflows. Activate on "GitHub Actions", "CI/CD", "workflow", "deployment pipeline", "automated…
  • 100deployment-ci-cd
    CI/CD pipeline design and deployment automation for all stacks — GitHub Actions workflows, Docker multi-stage builds, Cloud Run deployments, Flutter distribution, and Firebase rule deployments. Use when setting up or reviewing CI/CD pipelines, deployment workflows, or automated release processes.

Feedback and reports

Your message goes to Bartosz Sokoliński. An email address is needed only for a reply. See the privacy policy.