ericrisco/rsc-harness / skills/github-actions
github-actions
VerifiedUse 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`).
| File | Kind | Size |
|---|---|---|
| SKILL.md | skill md | 13.1 KB |
| evals/README.md | markdown | 985 B |
| evals/cases.yaml | config | 3.2 KB |
| references/caching-and-matrix.md | markdown | 3.9 KB |
| references/oidc-deploys.md | markdown | 4.6 KB |
| scripts/verify.shexecutable | script | 4.1 KB |
references/oidc-deploys.md
View on GitHub# OIDC cloud deploys (AWS / GCP / Azure)
The goal: a deploy job assumes a cloud identity with **no stored long-lived keys**. GitHub mints a short-lived OIDC JWT for the run; the cloud provider validates it against a trust you configured and hands back a token scoped to that job for minutes. The job needs `permissions: id-token: write`.
The recurring footgun across all three clouds is an **over-permissioned trust**: scoping it to `repo:ORG/*` (any repo in the org) instead of one repo + ref. Always pin the `sub` claim down to repo + ref, and for prod down to environment.
## The OIDC `sub` claim — scope it tight
GitHub puts the run's identity in the JWT `sub`. The cloud trust matches on it. Pick the narrowest that still works:
| `sub` value | Grants to | Use for |
| --- | --- | --- |
| `repo:ORG/REPO:ref:refs/heads/main` | only `main` of one repo | branch deploys |
| `repo:ORG/REPO:ref:refs/tags/v*` | tag pushes of one repo | release deploys |
| `repo:ORG/REPO:environment:production` | the `production` environment of one repo | gated prod deploys (preferred) |
| `repo:ORG/*` | **any repo in the org** | almost never — this is the footgun |
Scoping to `environment:production` is strongest: the deploy only works from a job that names that environment, and the environment carries the required-reviewer gate.
## AWS — IAM role + `configure-aws-credentials`
One-time setup: create an IAM OIDC identity provider for `token.actions.githubusercontent.com`, then a role whose trust policy matches the `sub`.
```json
{
"Effect": "Allow",
"Principal": { "Federated": "arn:aws:iam::123456789012:oidc-provider/token.actions.githubusercontent.com" },
"Action": "sts:AssumeRoleWithWebIdentity",
"Condition": {
"StringEquals": {
"token.actions.githubusercontent.com:aud": "sts.amazonaws.com",
"token.actions.githubusercontent.com:sub": "repo:ORG/REPO:environment:production"
}
}
}
```
In the workflow:
```yaml
permissions:
id-token: write
contents: read
steps:
- uses: aws-actions/configure-aws-credentials@<full-40-char-sha> # pin it
with:
role-to-assume: arn:aws:iam::123456789012:role/gh-deploy
aws-region: eu-west-1
```
## GCP — Workload Identity Federation
Create a Workload Identity Pool + provider mapping `assertion.sub` to a principal, bind it to a service account.
```yaml
permissions:
id-token: write
contents: read
steps:
- uses: google-github-actions/auth@<full-40-char-sha>
with:
workload_identity_provider: projects/123/locations/global/workloadIdentityPools/gh/providers/gh
service_account: gh-deploy@my-project.iam.gserviceaccount.com
```
Add an attribute condition on the provider so only your repo + ref can mint a token:
`assertion.sub == 'repo:ORG/REPO:ref:refs/heads/main'`.
## Azure — federated credentials
On the app registration, add a federated credential with issuer `https://token.actions.githubusercontent.com`, subject `repo:ORG/REPO:environment:production`, audience `api://AzureADTokenExchange`.
```yaml
permissions:
id-token: write
contents: read
steps:
- uses: azure/login@<full-40-char-sha>
with:
client-id: ${{ vars.AZURE_CLIENT_ID }}
tenant-id: ${{ vars.AZURE_TENANT_ID }}
subscription-id: ${{ vars.AZURE_SUBSCRIPTION_ID }}
```
`client-id`/`tenant-id`/`subscription-id` are identifiers, not secrets — keep them in `vars`, not `secrets`.
## Full deploy-on-tag workflow with environment approval
```yaml
name: Release
on:
push:
tags: ["v*"]
permissions:
contents: read
concurrency:
group: release-production
cancel-in-progress: false # never interrupt a release
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v6
with: { node-version: 24, cache: npm }
- run: npm ci && npm run build
- uses: actions/upload-artifact@v4
with: { name: dist, path: dist/ }
deploy:
needs: build
runs-on: ubuntu-latest
environment: production # required-reviewer gate; pauses here for approval
permissions:
id-token: write # OIDC; no static keys
contents: read
steps:
- uses: actions/download-artifact@v4
with: { name: dist, path: dist/ }
- uses: aws-actions/configure-aws-credentials@<full-40-char-sha>
with:
role-to-assume: arn:aws:iam::123456789012:role/gh-deploy
aws-region: eu-west-1
- run: aws s3 sync dist/ s3://my-bucket --delete
```
The `environment: production` line is what makes GitHub pause for a reviewer before the deploy job starts — configure the required reviewers on the environment in repo settings, not in YAML.
Related skills
| Skill | Stars | Updated | Works with | Status | Install |
|---|---|---|---|---|---|
| writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deployment | Stars: 322k | Updated | Claude CodeCodex | Verified | Install |
| xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved. | Stars: 197k | Updated | Claude CodeCodex | Verified | Install |
| shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy. | Stars: 119k | Updated | Claude CodeCodex | Verified | Install |
| childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release. | Stars: 118k | Updated | Claude CodeCodex | Verified | Install |