ci-pipelines
Use when creating or editing CI workflows (.github/workflows, .gitlab-ci.yml, Buildkite pipelines), adding a nightly, scheduled, or cron job; when CI is slow, flaky, or fails only in CI; when pinning or updating GitHub Actions or setting up Renovate or Dependabot; or when configuring CI caching, required checks, branch protection, or workflow token permissions.
- License 许可
- MIT
- 所属仓库
- rahulmutt/devkit
- 最近更新
- 2026-10-19
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- ci-pipelines
- description
- Use when creating or editing CI workflows (.github/workflows, .gitlab-ci.yml, Buildkite pipelines), adding a nightly, scheduled, or cron job; when CI is slow, flaky, or fails only in CI; when pinning or updating GitHub Actions or setting up Renovate or Dependabot; or when configuring CI caching, required checks, branch protection, or workflow token permissions.
02 资源文件 1
- 参考文档references/github-actions.md4.2 KB
03 SKILL.md 正文
CI Pipelines
A pipeline is pinned, fast, gated by one required check, and exercises its
scheduled jobs on every change. Syntax per platform:
references/github-actions.md.
Principles — each with its counter-pull
Pin everything the pipeline touches
Toolchain through mise (developer-environment); runner images by explicit
version (ubuntu-24.04, not ubuntu-latest). Every uses: line is
@<40-char commit SHA> # vX.Y.Z, never a tag, not even "until the updater pins
it". Current pins:
actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1jdx/mise-action@2d8d4cafcbd33be2ea37d2b6f5ad595363d1f1ca # v5.1.1(caches the toolchain itself)
For any other action, resolve its SHA (git ls-remote) or leave it out. An
updater keeps the pins current: Renovate where mise is used (it also bumps
mise.toml and lockfiles), otherwise Dependabot. Counter-pull: a pin with no
updater just goes stale. Never pin without the automation that bumps it.
Fast feedback
Cheapest checks first; caches keyed on lockfile and toolchain hashes; superseded runs on the same branch cancelled. Counter-pull: a cache not keyed on its inputs causes stale-cache bugs, which are worse than slowness.
One required check
An aggregate gate job depends on every other job, and only it is required in branch protection, so adding or renaming jobs never needs a settings change. With a single job, that job is the gate. Don't add a wrapper. Counter-pull: path filters on required jobs leave PRs waiting on checks that never ran; filter inside the gate instead.
Scheduled pipelines are exercised on every change
A nightly never runs on PRs, so a change that breaks it merges green. Give the nightly a smoke mode (same workflow, same entry command, tiny budget: fuzz for 30s, one matrix entry, one simulation seed) and run it in the PR pipeline, feeding the gate. Lint the workflow files in the fast checks. Route scheduled failures somewhere loud (an issue or channel). GitHub disables scheduled workflows after 60 days without repository activity. Counter-pull: smoke mode checks that the setup works, not the nightly's coverage. If it grows toward the full run, it eats the PR time budget.
Also
Never check out and run PR-head code under pull_request_target (it has secrets
and a write token). Same-command CI, token permissions, and CI-only failures:
see the reference.
Boundaries with sibling skills
- Toolchain install and pinning →
developer-environment. - What runs in pre-commit / PR / nightly, and the PR time budget →
testing-practices. - Which scanners run, and secrets handling →
security-practices. - Exposing the gate as a named task →
navigable-codebases. - Release versioning, changelogs, and tags →
commits-and-releases.
04 同仓库更多 Skills
writing-clean-code
Use when refactoring or restructuring code, splitting a file or module that has grown too large, deciding whether to extract a helper or inline it, naming things, removing dead or unused code, drawing module or package boundaries, handling errors, writing comments, applying DDD or hexagonal (ports and adapters) architecture, or checking a language's idiomatic style.
using-devkit
Use when starting any conversation or new engineering task in a repo with devkit installed — establishes that devkit skills exist and must be checked before acting.
testing-practices
Use when writing, adding, or reviewing tests; choosing between unit, integration, snapshot/golden, property, fuzz, mutation, e2e/UI, or formal methods; when a test is flaky or the suite or CI is slow; or when deciding what runs in pre-commit, PR CI, or nightly.
security-practices
Use when code touches a trust boundary — HTTP endpoints, webhooks, file uploads, auth, sessions, permissions, SQL or shell built from input, deserialization, service-to-service calls — when handling secrets, API keys, or .env files, on a CVE or vulnerability alert, when writing a threat model, or when choosing secret, SCA, SAST, or container scanners.
navigable-codebases
Use when writing or updating a README, AGENTS.md, CLAUDE.md, GEMINI.md, ARCHITECTURE.md, or onboarding docs; when setting up a new repository; when adding or naming task-runner commands (mise tasks, Makefile, justfile, npm scripts); or when getting-started steps are missing, stale, or slow for newcomers.
developer-environment
Use when installing or upgrading any tool, runtime, CLI, or library — brew, apt, npm i -g, pip install, cargo install, nvm, pyenv, asdf — editing mise.toml or .tool-versions, bumping or pinning versions, adding a dependency, hitting "command not found", setting up a dev or CI toolchain, reviewing Renovate or Dependabot version bumps, or considering Bazel.