ericrisco/rsc-harness/github-actions
- community
Checking that the SKILL.md file is still in the repository.
Use when authoring or fixing GitHub Actions CI/CD — workflows under .github/workflows, triggers, job matrix, caching, token permissions, OIDC cloud deploys, environment gates, reusable workflows. NOT the Dockerfile or image build strategy (that is `docker`), NOT the branching model (that is `git-workflow`), NOT release readiness (that is `ship`).
Install
npx vskill@latest install ericrisco/rsc-harness/github-actionsSKILL.md
GitHub Actions CI/CD
A workflow is config that runs on an event. Before you write a single step, decide three things: which events fire the workflow, what permissions the token needs, and where credentials come from. Get those wrong and you have a fast pipeline that leaks secrets or a secure one nobody can trigger. Everything after that — checkout, install, test, build — is just steps.
This skill owns the workflow layer — the .github/workflows/*.yml files, their triggers, jobs, matrix, caching, secret/OIDC handling, environments and deploy gates. Route the rest out:
| Not this skill | Goes to | Because | |
|---|---|---|---|
The Dockerfile, image build strategy | ../docker/SKILL.md | The workflow may call docker build; designing the image is not this skill. | |
| Branching model, PR hygiene, merge vs rebase, commit conventions | ../git-workflow/SKILL.md | That is the source-control model, not the CI config layer. | |
| Release readiness checklist, changelog, the shipping decision | ../ship/SKILL.md | Whether to release is a decision; this skill only automates the mechanics. | |
| Blue/green, canary, rollback theory | ../deployment/SKILL.md | Actions triggers the deploy; the strategy is deployment's. | |
| Choosing the host and its deploy primitives | ../vercel/SKILL.md, ../aws-essentials/SKILL.md | Actions triggers the deploy; the host owns the target. | |
| Triaging SAST/CVE findings, threat modeling | ../secure-coding/SKILL.md | This skill runs a scanner as a job; it does not interpret the report. |
Decide the trigger first
Pick the event(s) for each job class before writing YAML — the trigger decides what context and secrets the run gets.
| Event | Use it for | Why | |
|---|---|---|---|
pull_request | lint, test, build-check | Runs on the merge ref; from forks it gets no secrets (safe). | |
push (to main) | deploy, publish artifacts, build the release | The trusted ref with full secrets/OIDC. | |
workflow_dispatch | manual ops, one-off backfills, manual deploys | Human-triggered with inputs; auditable. | |
schedule (cron) | nightly builds, dependency audits, cache warmers | Cron in UTC; no human in the loop. | |
release / push tags | publish to a registry, cut a GitHub Release | Fires on the tag, not every commit. | |
workflow_call | reusable workflow invoked by others | Library of jobs; never runs on its own. | |
pull_request_target | label/comment bots that need write on forks | Runs trusted with secrets — never check out PR head here. |
Do not run the same heavy job on both push and pull_request for the same commit — you pay runner minutes twice. Use pull_request for the checks and a separate push: branches: [main] job for deploy.
Anatomy of a CI workflow
The minimal good CI: scoped trigger, read-only token, concurrency that cancels stale PR runs, built-in cache.
Why those three lines are not optional:
permissions: contents: readat the top — default token permissions may be write, and a leaked write token can push tags or publish packages. Widen per job and only to what that job needs (packages: writeto publish,id-token: writefor OIDC), never at the top.concurrency+cancel-in-progress: true— without it every push to an open PR leaves the old run finishing and billing. One group per ref keeps at most one running + one pending.actions/checkout@v6,setup-node@v6are the current majors (checkout v6.0.2, setup-node v6.4.0). Old majors run on Node 20, removed from runners in September 2026; JS actions are forced onto Node 24 by default since June 2026.
Caching
Two mechanisms, in order of preference:
- Built-in `cache:` on `setup-*` —
setup-node,setup-python,setup-go, etc. cache the package manager's store keyed on the lockfile. Free, one line. Use it. - `actions/cache@v4` — for anything else (build output, custom tool dirs, compiled artifacts).
The cache key is the whole game. A cache is immutable once written for a key — if your key never changes, you cache stale deps forever.
restore-keys is a prefix fallback: an exact-key miss still restores the most recent cache whose key starts with the prefix, so a one-package change does not cold-start. Monorepo keys, Docker layer caching (type=gha), and runner-minute cost tradeoffs live in references/caching-and-matrix.md.
Matrix
Run one job definition across combinations — OS x version is the common case.
Set fail-fast: false when you want every combination's verdict (a compatibility matrix); leave it true (default) when one failure should abort the rest to save minutes. macOS and Windows runners bill at a multiple of Linux minutes — exclude the cells you do not need.
Secrets and OIDC — the security heart
The rule: no long-lived cloud keys in repo secrets. Use OIDC. GitHub mints a short-lived JWT per run; AWS/Azure/GCP exchange it for a token scoped to that job, valid for minutes. Nothing static to steal — by 2026, static CI credentials are a compliance violation in regulated orgs.
Hard rules:
- Never `echo` a secret or pass it to an untrusted step. Secrets are masked in logs, but a third-party action or a crafted
printfcan exfiltrate them. - Scope the cloud trust to repo + ref (+ environment). The common 2026 misconfig is a trust policy with
repo:ORG/*— that lets any repo in the org assume your prod role. Scopesubtorepo:ORG/REPO:ref:refs/heads/mainorenvironment:production. - Gate prod with an `environment` + required reviewers so a human approves before the deploy job runs.
Per-cloud trust setup (AWS role, GCP Workload Identity Federation, Azure federated credentials), the over-permissioned-trust footgun, and a full deploy-on-tag workflow with approval are in references/oidc-deploys.md.
Supply chain and least privilege
- SHA-pin third-party actions to a full 40-char commit SHA, not a tag. Tags are mutable: the tj-actions/changed-files compromise (2025) retargeted all tags to malicious code that dumped secrets. A SHA is the only immutable reference. GitHub now offers repo/org/enterprise policy to enforce full-SHA pinning across the whole tree.
```yaml # Bad — mutable tag; whoever controls the repo can repoint v1 at anything
- uses: some-org/some-action@v1
# Good — immutable, with a comment recording the human-readable version
- uses: some-org/some-action@a1b2c3d4e5f6a7b8c9d0e1f2a3b4c5d6e7f8a9b0 # v1.4.2
```
First-party actions/* and github/* may stay on a major tag (GitHub controls them), but pinning everything is the stronger posture.
- `pull_request_target` + checking out the PR head = remote code execution with your secrets. That trigger runs in the base repo's trusted context. If you then
checkoutgithub.event.pull_request.head.sha, you execute a fork's code with full secret access. Never combine them.
Reuse: workflow vs composite action
Both kill copy-paste; pick by scope.
| You need to reuse... | Use | Note | |
|---|---|---|---|
whole jobs with their own runs-on / services / matrix | reusable workflow (on: workflow_call) | secrets: inherit to forward; set concurrency inside it. | |
| a set of steps that run inside one existing job | composite action | Lives at .github/actions/<name>/action.yml. |
Gotcha: concurrency on the job that calls a reusable workflow does not behave as you expect — declare it inside the called workflow.
Deploy job pattern
A deploy depends on the build, gets its own environment gate, and must never be cancelled mid-release.
cancel-in-progress: false here is the opposite of the CI default: cancelling a half-finished deploy can leave prod in a broken state.
Anti-patterns
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 95 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingskills/github-actions/SKILL.md
Popularity
- Repository stars
- 141
- Repository forks
- 11
- 7-day trend score
- 30
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/ericrisco/rsc-harness/github-actions)