github-actions
Skill2 starsChanged 4 months agoMITView on GitHub
Comprehensive guide for building robust, secure, and efficient CI/CD pipelines using GitHub Actions. Use when the task involves `creating or editing GitHub Actions workflows`, `.github/workflows/*.yml`, `CI/CD pipelines`, `GitHub Actions best practices`, or `workflow optimization`.
- Reads credentials
37 other projects use a version of this.
Adopted by
Most recently taken up by
- fmind/dottheir own version, first seen Oct 5, 2026
- tddworks/ClaudeBartheir own version, first seen Oct 5, 2026
- Alex72-py/termux-elitetheir own version, first seen Oct 4, 2026
- LuisUrrutia/skillstheir own version, first seen Oct 4, 2026
- Just-Silver/just-silver-skillstheir own version, first seen Sep 30, 2026
- nahid-sparktales/agent-dispatchertheir own version, first seen Sep 21, 2026
Used with
Projects with it also use react-native-brownfield-migration, upgrading-react-native and 7 more.
Other files people use alongside this one.
Files found in the same public projects as a version of this one, more often than they turn up anywhere else. Each project counts once, large collections count for less, and this file's own repository is left out.
maikotrindadeSkillreact-native-brownfield-migration
Provides an incremental adoption strategy to migrate native iOS or Android apps to React Native or Expo using @callstack/react-native-brownfield for initial setup. Use when planning migration steps, packaging XCFramework/AAR artifacts, and integrating them into host apps.
Also in 4 projects that use this
maikotrindadeSkillupgrading-react-native
Upgrades React Native apps to newer versions by applying rn-diff-purge template diffs, updating package.json dependencies, migrating native iOS and Android configuration, resolving CocoaPods and Gradle changes, and handling breaking API updates. Use when upgrading React Native, bumping RN version, updating from RN 0.x to 0.y, or migrating Expo SDK alongside a React Native upgrade.
Also in 3 projects that use this
ihiteshguptaSkillterraform
Expert in Infrastructure as Code with Terraform. Use for creating, managing, and versioning infrastructure across cloud providers.
Also in 4 projects that use this
NVIDIASkillgithub
Interact with GitHub using the gh CLI restricted to REST API only (no GraphQL). Use when the user wants to work with GitHub issues, pull requests, repos, releases, or Actions — especially in sandboxed environments where the GraphQL endpoint may be blocked. Trigger keywords - github, gh, pull request, PR, github issue, github actions, workflow, release, gh api.
Also in 5 projects that use this
akornmeierSkilldocker
Guide for using Docker - a containerization platform for building, running, and deploying applications in isolated containers. Use when containerizing applications, creating Dockerfiles, working with Docker Compose, managing images/containers, configuring networking and storage, optimizing builds, deploying to production, or implementing CI/CD pipelines with Docker.
Also in 3 projects that use this
OpenAISkillobservability
Vercel Observability expert guidance — Drains (logs, traces, speed insights, web analytics), Web Analytics, Speed Insights, runtime logs, custom events, OpenTelemetry integration, and monitoring dashboards. Use when instrumenting, debugging, or optimizing application performance and user experience on Vercel.
Also in 3 projects that use this
Other versions37 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 37
- callstackincubator/agent-skills★ 1.7ksame name
- tddworks/ClaudeBar★ 1.5ksame name
- wendylabsinc/claude-skills★ 62same name
- nahid-sparktales/agent-dispatcher★ 59same name
- mujez/claude-skills★ 47same name
- inbharatai/claude-skills★ 37same name
- dhruvanbhalara/skills★ 30same name
- sabahattink/antigravity-fullstack-hq★ 30same name
- maikotrindade/awesome-react-native-skills★ 12same name
- fmind/dot★ 10same name
27 more not listed
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository43 other files it gives its agents.
- accessibilitySkill
- best-practicesSkill
- brainstormingSkill
- core-web-vitalsSkill
- cypress-e2eSkill
- docker-expertSkill
- drizzle-ormSkill
- elixir-developmentSkill
- eslint-configSkill
- express-apiSkill
- frontend-designSkill
- go-developmentSkill
- grafana-dashboardsSkill
- grpc-apiSkill
- helm-chartsSkill
- jest-testingSkill
- kubernetes-orchestrationSkill
- makefileSkill
- markdown-a11ySkill
- nothing-designSkill
- performanceSkill
- php-developmentSkill
- pinned-tagSkill
- postgresql-developmentSkill
- pr-creatorSkill
- prettier-formattingSkill
- pydanticSkill
- qwik-developmentSkill
- rails-developmentSkill
- ruby-developmentSkill
- rust-async-patternsSkill
- seoSkill
- skill-creatorSkill
- solidjs-developmentSkill
- sqlalchemySkill
- sql-optimization-patternsSkill
- swift-ios-developmentSkill
- tensorflow-mlSkill
- testing-librarySkill
- trpc-type-safetySkill
- webapp-testingSkill
- web-quality-auditSkill
- zig-developmentSkill
The file
We split this skill into the rules it gives an agent
8 rules. 0 are common, 3 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 30 edited versions we read keep these.
3
Distinctive
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 23
Pin Actions to Commit SHA: Always use full commit SHA, never mutable tags (@v4, @main).
- Very specific: line 24
Add version as comment: uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1.
- Very specific: line 29
Secrets via
secretsContext Only: Never hardcode sensitive data. - Distinctive: line 30
Use environment secrets for deployment targets with manual approvals.
- Distinctive: line 31
OIDC Over Static Credentials: Use OpenID Connect for cloud auth (AWS, Azure, GCP) instead of long-lived access keys.
- Very specific: line 33
Cache Dependencies: Use actions/cache with hashFiles() keys for node_modules, pip, Maven, etc.
- Very specific: line 35
Shallow Clone: Use fetch-depth: 1 in actions/checkout unless full history is needed.
- Distinctive: line 37
Environment Protection: Use GitHub Environments with required reviewers and branch restrictions for staging/production deploys.
“Common” is measured: kept by at least 6 in 10 of the 30 edited versions of this file we could read. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
When to Use
- Creating or editing GitHub Actions workflow files (
.github/workflows/*.yml) - Reviewing CI/CD pipelines for security, performance, or correctness
- Setting up automated testing, building, or deployment pipelines
- Troubleshooting failing or flaky GitHub Actions workflows
- Designing deployment strategies (staging, production, blue/green, canary)
Critical Patterns
- Pin Actions to Commit SHA: Always use full commit SHA, never mutable tags (
@v4,@main). Add version as comment:uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1. Tags can be silently moved to compromised commits (supply chain attack). - Least Privilege
GITHUB_TOKEN: Setpermissions: contents: readat workflow level. Grant write only where explicitly needed, per-job. - Secrets via
secretsContext Only: Never hardcode sensitive data. Use${{ secrets.NAME }}. Use environment secrets for deployment targets with manual approvals. - OIDC Over Static Credentials: Use OpenID Connect for cloud auth (AWS, Azure, GCP) instead of long-lived access keys.
- Cache Dependencies: Use
actions/cachewithhashFiles()keys fornode_modules, pip, Maven, etc. to dramatically speed up builds. - Shallow Clone: Use
fetch-depth: 1inactions/checkoutunless full history is needed. - Fail Fast on Security: Integrate dependency review and SAST (CodeQL) as blocking checks.
- Environment Protection: Use GitHub Environments with required reviewers and branch restrictions for staging/production deploys.
Workflow Structure
name: CI/CD Pipeline
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
inputs:
environment:
description: 'Deploy target'
required: false
default: 'staging'
type: choice
options: [ staging, production ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read # Least privilege default
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
with:
fetch-depth: 1
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run lint
test:
runs-on: ubuntu-latest
needs: lint
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm test -- --coverage
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
if: always()
with:
name: test-results
path: coverage/
retention-days: 14
build:
runs-on: ubuntu-latest
needs: test
outputs:
artifact_name: ${{ steps.package.outputs.name }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: 20
cache: 'npm'
- run: npm ci
- run: npm run build
- name: Package application
id: package
run: |
zip -r dist.zip dist
echo "name=dist.zip" >> "$GITHUB_OUTPUT"
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: app-build
path: dist.zip
retention-days: 30
deploy-staging:
runs-on: ubuntu-latest
needs: build
if: github.ref == 'refs/heads/main'
environment:
name: staging
url: https://staging.example.com
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: app-build
- name: Deploy to staging
env:
DEPLOY_TOKEN: ${{ secrets.STAGING_DEPLOY_TOKEN }}
run: |
unzip dist.zip
echo "Deploying to staging..."
# ./deploy.sh --env stagingCode Examples
Action Pinning (Security)
# BAD: mutable tag — vulnerable to supply chain attacks
- uses: actions/checkout@v4
- uses: some-org/some-action@main
# GOOD: immutable SHA with version comment
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: some-org/some-action@a1b2c3d4e5f6a1b2c3d4e5f6a1b2c3d4e5f6a1b2 # v2.1.0Permissions (Least Privilege)
# Workflow-level: restrictive default
permissions:
contents: read
jobs:
lint:
# Inherits read-only — no override needed
steps: [ ... ]
deploy:
permissions:
contents: read
deployments: write # Only this job needs write
steps: [ ... ]
comment-on-pr:
permissions:
contents: read
pull-requests: write # Only this job needs PR write
steps: [ ... ]Caching
- name: Cache node modules
uses: actions/cache@668228422ae6a00e4ad889ee87cd7109ec5666a7 # v5.0.4
with:
path: |
~/.npm
node_modules
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-Matrix Strategy
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ ubuntu-latest, windows-latest ]
node-version: [ 18, 20, 22 ]
exclude:
- os: windows-latest
node-version: 18
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: ${{ matrix.node-version }}
- run: npm ci && npm testOIDC Cloud Authentication
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
id-token: write # Required for OIDC
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@ececac1a45f3b08a01d2dd070d28d111c5fe6722 # v4.1.0
with:
role-to-assume: arn:aws:iam::123456789012:role/my-deploy-role
aws-region: us-east-1
# No static credentials stored — short-lived token via OIDC
- run: aws s3 sync dist/ s3://my-bucket/Integration Tests with Services
jobs:
integration:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:16-alpine
env:
POSTGRES_DB: testdb
POSTGRES_USER: test
POSTGRES_PASSWORD: test
ports:
- 5432:5432
options: >-
--health-cmd "pg_isready -U test"
--health-interval 10s
--health-timeout 5s
--health-retries 5
redis:
image: redis:7-alpine
ports:
- 6379:6379
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- run: npm ci
- run: npm run test:integration
env:
DATABASE_URL: postgresql://test:test@localhost:5432/testdb
REDIS_URL: redis://localhost:6379Environment Protection (Production Deploy)
jobs:
deploy-prod:
runs-on: ubuntu-latest
needs: [ test, build, deploy-staging ]
if: github.ref == 'refs/heads/main'
environment:
name: production
url: https://example.com
steps:
- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: app-build
- name: Deploy to production
env:
PROD_API_KEY: ${{ secrets.PROD_API_KEY }}
run: ./deploy.sh --env production
- name: Post-deploy smoke test
run: |
curl -sf https://example.com/health || exit 1
echo "Smoke test passed"Reusable Workflow
# .github/workflows/reusable-build.yml
name: Reusable Build
on:
workflow_call:
inputs:
node-version:
required: false
type: string
default: '20'
outputs:
artifact-name:
description: 'Name of the uploaded artifact'
value: ${{ jobs.build.outputs.artifact-name }}
jobs:
build:
runs-on: ubuntu-latest
outputs:
artifact-name: app-build-${{ github.sha }}
steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1
- uses: actions/setup-node@3235b876344d2a9aa001b8d1453c930bba69e610 # v3.9.1
with:
node-version: ${{ inputs.node-version }}
cache: 'npm'
- run: npm ci && npm run build
- uses: actions/upload-artifact@bbbca2ddaa5d8feaa63e36b76fdaad77386f024f # v7.0.0
with:
name: app-build-${{ github.sha }}
path: dist/
# Caller workflow
# .github/workflows/ci.yml
jobs:
build:
uses: ./.github/workflows/reusable-build.yml
with:
node-version: '20'Anti-Patterns to Avoid
| Anti-Pattern | Risk | Do Instead |
uses: actions/checkout@v4 (mutable tag) | Supply chain attack — tag can be moved to malicious commit | Pin to full SHA: @34e114876b0b11c390a56381ad16ebd13914f8d5 # v4.3.1 |
No permissions block | GITHUB_TOKEN gets default broad access | Set permissions: contents: read at workflow level |
secrets.MY_KEY in echo or logs | Secret leakage even with masking | Never print secrets; use them only in env vars for commands |
| Long-lived cloud credentials as secrets | Large blast radius if compromised | Use OIDC for short-lived tokens |
fetch-depth: 0 by default | Slow checkout, wastes bandwidth | fetch-depth: 1 unless full history needed |
No concurrency on deploy workflows | Race conditions, double deploys | Add concurrency with cancel-in-progress |
| Hardcoded versions in multiple places | Drift, maintenance burden | Use reusable workflows or composite actions |
No timeout-minutes on jobs | Hung workflows burn runner minutes | Set reasonable timeout-minutes per job |
No retention-days on artifacts | Storage bloat, cost increase | Set retention-days based on need (7-30 days) |
| Running E2E tests on every push | Slow CI, wasted resources | Run on PR and main only, or use path filters |
Deployment Strategies Reference
| Strategy | How It Works | Best For | Rollback |
| Rolling | Gradually replaces old instances | Stateless apps, most cases | Redeploy previous version |
| Blue/Green | Full parallel env, switch traffic | Zero-downtime critical apps | Switch traffic back to blue |
| Canary | Route small % to new version | Risk-sensitive changes | Route 100% back to stable |
| Dark Launch | Deploy hidden behind feature flags | Decoupling deploy from release | Toggle flag off |
Commands
# Validate workflow syntax locally
actionlint .github/workflows/*.yml
# Run workflow locally with act
act push --job build
# List workflow runs
gh run list --workflow=ci.yml
# View specific run logs
gh run view <run-id> --log
# Re-run failed jobs
gh run rerun <run-id> --failed
# Trigger manual workflow
gh workflow run deploy.yml -f environment=staging
# List secrets (names only)
gh secret listResources
- Review Checklist: See references/review-checklist.md for a comprehensive workflow review checklist
- Troubleshooting: See references/troubleshooting.md for diagnosing common failures
- GitHub Actions Documentation
- Security Hardening Guide
- OIDC with Cloud Providers
- Related skill: docker-expert — for Dockerfile and container best practices
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

