github-actions
Skill1 starsChanged 8 months agoMITView on GitHub
This skill should be used when creating, editing, debugging, or reviewing GitHub Actions workflows and custom actions. Covers workflow syntax, triggers, jobs, matrix strategies, caching, secrets, security hardening, reusable workflows, composite/Docker/JavaScript actions, and deployment environments.
- Reads credentials
- Installs packages
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 10 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 repository5 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- captureSkill
- ios-simulatorSkill
- _templateSkill
The file
We split this skill into the rules it gives an agent
9 rules. 0 are common, 4 are distinctive, and 5 are very specific to this project.
0
Common
Most of the 30 edited versions we read keep these.
4
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
- Distinctive: line 8
Create, edit, debug, and optimize GitHub Actions workflows and custom actions.
- Very specific: line 21
All workflow files must be in .github/workflows/.
- Very specific: line 232
Use if: success() || failure() to run on both outcomes but skip cancellation.
- Very specific: line 304
Always include github.workflow in the group name to avoid cross-workflow cancellation.
- Very specific: line 308
Prefer setup actions with built-in caching over raw actions/cache:
- Very specific: line 341
Always pass secrets via env:, never interpolate directly in run: scripts
- Distinctive: line 454
Use OIDC for cloud auth instead of long-lived credentials
- Distinctive: line 457
Never use self-hosted runners for public repos
- Distinctive: line 458
Never store structured data (JSON/XML) as secrets -- redaction relies on exact string matching
“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
GitHub Actions
Create, edit, debug, and optimize GitHub Actions workflows and custom actions.
Trigger
Activate when working with:
- Files in
.github/workflows/(workflow YAML files) - Files named
action.ymloraction.yaml(custom action definitions) - Any task involving CI/CD pipeline configuration for GitHub repositories
- Debugging failed workflow runs or action errors
Workflow Fundamentals
File Location
All workflow files must be in .github/workflows/. Subdirectories are not supported.
Minimal Workflow Structure
name: CI
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: echo "Hello"Top-Level Keys
name-- display name in Actions tab (optional)run-name-- names the run, supportsgithubandinputscontexts (optional)on-- trigger event(s) (required)permissions-- GITHUB_TOKEN scopesenv-- workflow-level environment variablesdefaults.run-- defaultshellandworking-directoryforrunstepsconcurrency-- prevent duplicate runsjobs-- job definitions (required)
Events and Triggers
Common Trigger Patterns
# Branch and path filtering
on:
push:
branches: [main, 'releases/**']
paths: ['src/**']
paths-ignore: ['docs/**']
pull_request:
branches: [main]
types: [opened, synchronize, reopened]
# Scheduled (cron)
on:
schedule:
- cron: '30 5 * * 1-5'
# Manual dispatch with typed inputs
on:
workflow_dispatch:
inputs:
environment:
type: choice
options: [staging, production]
required: true
dry_run:
type: boolean
default: false
# API-triggered
on:
repository_dispatch:
types: [deploy]
# Chain workflows
on:
workflow_run:
workflows: ["Build"]
types: [completed]
branches: [main]Input Types for workflow_dispatch
boolean, choice, number, environment, string. Max 25 inputs.
Filter Pattern Syntax
*matches any character except/**matches any character including/!negation (must follow a positive pattern)- Cannot mix
brancheswithbranches-ignore-- use!negation instead
Key pull_request Activity Types
opened, synchronize, reopened, closed, ready_for_review, labeled, unlabeled, review_requested, converted_to_draft
For a full event and activity type reference, consult references/syntax-reference.md.
Jobs
Job Configuration
jobs:
build:
runs-on: ubuntu-latest
needs: [lint, test] # dependencies
if: github.ref == 'refs/heads/main'
timeout-minutes: 30 # default: 360
continue-on-error: false
permissions:
contents: read
environment:
name: production
url: https://myapp.example.com
outputs:
version: ${{ steps.ver.outputs.value }}
env:
NODE_ENV: production
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4Steps
steps:
- id: step1
name: "Display Name"
if: success()
uses: actions/checkout@v4
with:
ref: main
env:
TOKEN: ${{ secrets.MY_TOKEN }}
continue-on-error: true
timeout-minutes: 10
- name: Run commands
run: |
npm install
npm test
shell: bash
working-directory: ./appSetting Outputs
# Step output
- id: my_step
run: echo "result=value" >> $GITHUB_OUTPUT
# Multiline output (use heredoc delimiters)
- run: |
echo "json<<EOF" >> "$GITHUB_OUTPUT"
cat result.json >> "$GITHUB_OUTPUT"
echo "EOF" >> "$GITHUB_OUTPUT"
# Job output (declared at job level, references step)
jobs:
build:
outputs:
artifact-id: ${{ steps.upload.outputs.id }}
# Consume in dependent job
deploy:
needs: build
steps:
- run: echo "${{ needs.build.outputs.artifact-id }}"Dynamic Environment Variables
- run: echo "MY_VAR=hello" >> $GITHUB_ENV
- run: echo "$MY_VAR" # available in subsequent stepsJob Summaries
- run: echo "### Build Results :rocket:" >> $GITHUB_STEP_SUMMARYMatrix Strategies
strategy:
fail-fast: false
max-parallel: 4
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
node: [18, 20, 22]
include:
- os: ubuntu-latest
node: 16
experimental: true
exclude:
- os: macos-latest
node: 18
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental == true }}Dynamic Matrix from Job Output
jobs:
setup:
outputs:
matrix: ${{ steps.set.outputs.matrix }}
steps:
- id: set
run: echo 'matrix=["a","b","c"]' >> "$GITHUB_OUTPUT"
run:
needs: setup
strategy:
matrix:
value: ${{ fromJSON(needs.setup.outputs.matrix) }}Expressions and Contexts
Status Check Functions (for if: conditionals)
success()-- all previous steps succeeded (default)failure()-- any previous step failedalways()-- runs even if cancelledcancelled()-- workflow was cancelled
Use if: success() || failure() to run on both outcomes but skip cancellation.
Common Patterns
if: github.ref == 'refs/heads/main'
if: github.event_name == 'pull_request'
if: contains(github.event.pull_request.labels.*.name, 'deploy')
if: startsWith(github.ref, 'refs/tags/')
if: always() && needs.build.result == 'success'
# Ternary-like
value: ${{ github.event_name == 'push' && 'production' || 'staging' }}Key Contexts
github.*-- workflow run info (ref,sha,actor,event,repository, etc.)env.*-- environment variablesvars.*-- configuration variables (repo/org/environment level)secrets.*-- secret valuessteps.<id>.outputs.*-- step outputsneeds.<job_id>.outputs.*-- dependent job outputsmatrix.*-- current matrix valuesrunner.*-- runner info (os,arch,temp)inputs.*-- workflow_dispatch/workflow_call inputs
Built-in Functions
contains(search, item),startsWith(),endsWith()-- case-insensitiveformat('{0} {1}', val0, val1)-- string formattingjoin(array, separator)-- default separator,toJSON(value),fromJSON(value)-- JSON serializationhashFiles(pattern)-- SHA-256 of matching filessuccess(),failure(),always(),cancelled()-- status checks
For complete context properties, consult references/syntax-reference.md.
Permissions
# Workflow-level (applies to all jobs by default)
permissions:
contents: read
pull-requests: write
# Job-level override
jobs:
deploy:
permissions:
contents: read
id-token: write
# Shorthand
permissions: read-all
permissions: {} # disable allAvailable scopes: actions, attestations, checks, contents, deployments, discussions, id-token, issues, models, packages, pages, pull-requests, security-events, statuses.
Access levels: read, write, none.
Concurrency
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# For PRs (fallback when github.head_ref is undefined)
concurrency:
group: ${{ github.head_ref || github.run_id }}
cancel-in-progress: trueAlways include github.workflow in the group name to avoid cross-workflow cancellation.
Caching
Prefer setup actions with built-in caching over raw actions/cache:
- uses: actions/setup-node@v4
with:
node-version: 20
cache: npmManual caching:
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-npm-Secrets
# Use as environment variable (preferred -- avoids leaking via process args)
- env:
API_KEY: ${{ secrets.API_KEY }}
run: curl -H "Authorization: Bearer $API_KEY" https://api.example.com
# Pass as action input
- uses: some/action@v1
with:
token: ${{ secrets.MY_TOKEN }}Key rules:
- Always pass secrets via
env:, never interpolate directly inrun:scripts - Secrets cannot be used in
if:conditionals -- set as env var first - Secrets are not passed to workflows triggered from forks
- Secrets must be explicitly passed to reusable workflows (or use
secrets: inherit) - GITHUB_TOKEN is automatic and scoped to the repo
Reusable Workflows
Define (workflow_call)
on:
workflow_call:
inputs:
environment:
required: true
type: string
secrets:
deploy_key:
required: true
outputs:
url:
value: ${{ jobs.deploy.outputs.url }}Call
jobs:
deploy:
uses: ./.github/workflows/reusable-deploy.yml
with:
environment: staging
secrets:
deploy_key: ${{ secrets.STAGING_KEY }}
# Or pass all secrets
deploy-alt:
uses: org/repo/.github/workflows/deploy.yml@main
secrets: inheritLimitations: max 9 levels nesting, no loops, uses must be at job level (not in steps).
Custom Actions
Three Types
| Type | Platform | Speed | runs.using |
| Composite | All | Fast | composite |
| JavaScript | All | Fast | node20 |
| Docker | Linux only | Slower | docker |
Composite Action (action.yml)
name: 'My Action'
description: 'Does something useful'
inputs:
name:
required: true
outputs:
result:
value: ${{ steps.run.outputs.result }}
runs:
using: composite
steps:
- id: run
run: echo "result=done" >> $GITHUB_OUTPUT
shell: bash # shell is MANDATORY on every run stepReferencing Actions
- uses: actions/checkout@8e5e7e5ab8b370d2c5cb812c4b306480e4a84920 # SHA (most secure)
- uses: actions/checkout@v4 # tag
- uses: ./.github/actions/my-action # local
- uses: docker://alpine:3.18 # Docker imageDeployment Environments
jobs:
deploy:
environment:
name: production
url: https://myapp.example.com
runs-on: ubuntu-latestFeatures (configured in repo Settings > Environments): required reviewers, wait timers, deployment branch restrictions, environment-scoped secrets and variables.
Security Hardening
Critical Rules
- Pin actions to full SHA -- tags can be moved maliciously
- Use least-privilege permissions -- start with
permissions: {}, add back per-job - Never interpolate untrusted input in
run:scripts -- use intermediate env vars
Script Injection Prevention
# VULNERABLE
- run: echo "Title: ${{ github.event.pull_request.title }}"
# SECURE
- env:
TITLE: ${{ github.event.pull_request.title }}
run: echo "Title: $TITLE"Dangerous Contexts (always treat as untrusted)
github.event.pull_request.title, github.event.pull_request.body, github.event.comment.body, github.event.issue.title, github.event.issue.body, github.head_ref, github.event.head_commit.message
Additional Security Measures
- Use OIDC for cloud auth instead of long-lived credentials
- Protect
.github/workflows/with CODEOWNERS - Enable Dependabot for action version updates
- Never use self-hosted runners for public repos
- Never store structured data (JSON/XML) as secrets -- redaction relies on exact string matching
Using gh CLI in Workflows
GitHub CLI is pre-installed on all runners. Set GH_TOKEN for auth:
- run: gh pr comment $PR --body "LGTM"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR: ${{ github.event.pull_request.number }}References
For the complete syntax reference including all trigger events with activity types, all context properties, and detailed examples, consult references/syntax-reference.md.
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.

