github-actions-templates
Production-ready GitHub Actions workflow patterns for testing, building, and deploying applications.
它会碰到什么
这一栏是扫描器报的事实,不是结论。命中多不等于有毒(安全工具、规则库、示例脚本本来就会包含危险写法),命中少也不等于干净。它和你手上的凭据、文件、网络有什么关系,需要你自己看。
技能内容
GitHub Actions Workflow Patterns
When to Use
Implement testing, matrix builds, artifact preparation or an explicitly authorized deployment workflow for an existing repository.
Inputs
Inspect the repository's actual scripts, lockfile, supported runtimes, required check names and release policy. Read resources/implementation-playbook.md and references/common-workflows.md before choosing job boundaries.
Test Workflow
This Node example assumes the target repository declares npm test and supports Node 22. Adapt the runtime and command to the actual project. The pinned action revisions are explicit review inputs; verify them before adopting or updating the template.
name: Test
on:
pull_request:
push:
branches: [main]
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- uses: actions/checkout@93cb6efe18208431cddfb8368fd83d5badbf9bfd
with:
persist-credentials: false
- uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444
with:
node-version: '22'
cache: npm
- run: npm ci
- run: npm test
Matrix Builds
Add a matrix only for versions and operating systems the project supports. Keep dependencies reproducible, identify failing combinations, and avoid hiding failures with blanket continue-on-error. Test required-check behavior when jobs are conditionally skipped.
Build and Publication
Build an artifact from the tested commit and record its identity. Publication needs a separate trusted job with the minimum registry permission. Do not publish artifacts produced by arbitrary untrusted code in a privileged context; bind accepted artifacts to their exact source and producing workflow.
Deployment
Use the project's protected release path. Identify the immutable artifact, destination, workload identity, rollout and rollback checks before adding deployment commands. A named GitHub environment does not configure reviewers automatically. Verify its actual protections. Do not label a placeholder echo command as a successful deployment.
Verification
Exercise one passing change and one deliberate test failure on a topic branch. Confirm the failing check prevents downstream publication. Inspect tokens, runner isolation, caches and artifact boundaries. Keep production credentials absent from untrusted validation jobs.
Example
A project needs Linux and Windows tests. Select its supported runtime, add the two runner combinations and confirm that either failure blocks the required result. Prepare publication separately; do not add registry credentials to the matrix.
Limitations
This skill supplies patterns, not an installed deployment program. Repository policy, runner trust and environment settings must be inspected. Review every third-party action at its full commit SHA and treat logs and uploaded artifacts as possible data-exposure paths.
Sources
想直接用这个技能?
本站把开放许可(MIT / Apache 等)的技能按仓库打包整理到网盘,点一下转存到你自己的网盘,不用一个个从 GitHub 拉。许可未声明的技能只给原始仓库链接,不打包。
它属于哪个仓库
plugins/agentic-awesome-skills/skills/github-actions-templates/SKILL.md同一个仓库里的其他技能
同名技能的其他版本
有 4 个不同仓库或目录里都有叫 github-actions-templates 的技能。它们内容并不相同,别混用:
- sickn33/agentic-awesome-skills — Production-ready GitHub Actions workflow patterns for testing, building, and deploying app
- sickn33/agentic-awesome-skills — Production-ready GitHub Actions workflow patterns for testing, building, and deploying app
- sickn33/agentic-awesome-skills — Production-ready GitHub Actions workflow patterns for testing, building, and deploying app