Iván

CI-CD

运维安全v1.0.0
作者:Iván更新于 2026-05-11ci-cd@clawhub_ivangdavila/ci-cd
DevOps

据 AlphaMoat 统计,截至 2026-09,CI-CD 累计下载 3,215 次、获 3 个星标,在全部 5,078 个 AI 技能中排名第 3,541 位,在「运维安全」分类(264 个)中排名第 231 位。

累计安装
106
累计下载
3,215
星标
3
全站排名
#3,541
全站前 70% · 「运维安全」前 88%
平台累计安装累计下载星标评论
ClawHub ↗1063,2013-
SkillHub ↗1043,2153—

各平台的计数口径不同,统计时间不一致。

这个技能是做什么的

主文提供平台选择建议、CI 模板入口、常见流水线问题、移动端签名提示、构建缓存和失败调试线索。示例需要按目标仓库和部署环境审核,避免照搬不安全权限或部署假设;固定经审阅的第三方 actions 与运行时版本,将秘密放入平台密钥存储,不要暴露给不可信的 pull request 工作流。

资料发布于 2026-10-29

可以用来做什么

  • 选择适合项目技术栈的 CI/CD 平台
  • 排查构建失败或缓存失效问题
  • 为移动端签名或部署整理检查清单

什么时候用

  • 需要为项目建立或优化 CI/CD 时
  • 能在复制模板前审阅权限、密钥和部署目标时
  • 第三方 actions 和运行时能够固定到已审阅版本时

示例提示词

以下是根据技能文档生成的示例,不代表实际运行结果。

检查这份 GitHub Actions 工作流中的权限和秘密暴露风险,不要执行部署
根据项目栈建议 CI 平台,并区分通用建议与需要验证的部分
为移动应用签名流程列出待审核的密钥和权限

月度数据趋势

累计下载3,215
1,6772,5033,3292026-03 · 累计下载 1,7912026-05 · 累计下载 2,5352026-06 · 累计下载 2,6972026-07 · 累计下载 2,9392026-08 · 累计下载 3,0912026-09 · 累计下载 3,21526-0326-09
星标3
2342026-03 · 星标 32026-05 · 星标 32026-06 · 星标 32026-07 · 星标 32026-08 · 星标 32026-09 · 星标 326-0326-09

2026-09 起统计方法调整:同名技能按作者分别统计,并覆盖全部技能。图中虚线为调整前的月份,与之后的数据不直接比较,也不计算跨越调整的增长。

月份累计下载环比星标
2026-093,215—3
2026-083,091+5.2%3
2026-072,939+9.0%3
2026-062,697+6.4%3
2026-052,535—3
2026-031,791—3

SKILL.md 原文

以下是作者发布的原始文件,按纯文本显示,本站未做修改或审核;其中的链接不可点击,命令请核实后再运行。抓取于 2026-10-23。

3.0 KB · ClawHub v1.0.0
---
name: "CI-CD"
description: "Automate builds, tests, and deployments across web, mobile, and backend applications."
---

## When to Use

Trigger on: automated deployment, continuous integration, pipeline setup, GitHub Actions, GitLab CI, build failing, deploy automatically, CI configuration, release automation.

## Platform Selection
展开全部(共 82 行)

| Stack | Recommended | Why |
|-------|-------------|-----|
| Web (Next.js, Nuxt, static) | Vercel, Netlify | Zero-config, auto-deploys, preview URLs |
| Mobile (iOS/Android/Flutter) | Codemagic, Bitrise + Fastlane | Pre-configured signing, app store upload |
| Backend/Docker | GitHub Actions, GitLab CI | Full control, self-hosted runners option |
| Monorepo | Nx/Turborepo + GHA | Affected detection, build caching |

**Decision tree:** If platform handles deploy automatically (Vercel, Netlify) → skip custom CI. Only add GitHub Actions when you need tests, custom builds, or deploy to your own infra.

## Quick Start Templates

For copy-paste workflows, see `templates.md`.

## Common Pipeline Pitfalls

| Mistake | Impact | Fix |
|---------|--------|-----|
| Using `latest` image tags | Builds break randomly | Pin versions: `node:20.11.0` |
| Not caching dependencies | +5-10 min per build | Cache `node_modules`, `.next/cache` |
| Secrets in workflow files | Leaked in logs/PRs | Use platform secrets, OIDC for cloud |
| Missing `timeout-minutes` | Stuck jobs burn budget | Always set: `timeout-minutes: 15` |
| No `concurrency` control | Redundant runs on rapid pushes | Group by branch/PR |
| Building on every push | Wasted resources | Build on push to main, test on PRs |

## Mobile-Specific: Code Signing

The #1 pain point. iOS requires certificates + provisioning profiles. Android requires keystores.

**The fix:** Use **Fastlane Match** — stores certs/profiles in git repo, syncs across team and CI.

```bash
# One-time setup
fastlane match init
fastlane match appstore

# In CI
fastlane match appstore --readonly
```

For detailed mobile CI/CD patterns (iOS, Android, Flutter), see `mobile.md`.

## Web-Specific: Build Caching

Next.js/Nuxt builds are slow without cache. The `No Cache Detected` warning = full rebuild.

```yaml
# GitHub Actions: persist Next.js cache
- uses: actions/cache@v4
  with:
    path: .next/cache
    key: nextjs-${{ hashFiles('**/package-lock.json') }}
```

For framework-specific configs, see `web.md`.

## Debugging Failed Builds

| Error Pattern | Likely Cause | Check |
|---------------|--------------|-------|
| Works locally, fails in CI | Environment drift | Node version, env vars, OS |
| Intermittent failures | Flaky tests, resource limits | Retry logic, increase timeout |
| `ENOENT` / file not found | Build order, missing artifact | Check `needs:` dependencies |
| Exit code 137 | Out of memory | Use larger runner or optimize |
| Certificate/signing errors | Expired or mismatched creds | Regenerate with Match/Fastlane |

## What This Doesn't Cover

- Container orchestration (Kubernetes) → see `k8s` skill
- Server configuration → see `server` skill
- Monitoring and observability → see `monitoring` skill

「运维安全」分类下的热门技能

Iván 的其他技能

数据月份:2026-09 · 下载/星标/安装数聚合自公开技能注册库(ClawHub、SkillHub),按月更新。口径说明见数据方法。