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
累計下載
3215
星標
3
全站排名
#3,541
全站前 70% · 「運維安全」前 88%
平台累計安裝累計下載星標評論
ClawHub ↗10632013-
SkillHub ↗10432153—

各平台的計數口徑不同,統計時間不一致。

這個技能是做什麼的

主文提供平台選擇建議、CI 模板入口、常見流水線問題、移動端簽名提示、構建快取和失敗除錯線索。示例需要按目標倉庫和部署環境稽核,避免照搬不安全許可權或部署假設;固定經審閱的第三方 actions 與執行時版本,將秘密放入平台金鑰儲存,不要暴露給不可信的 pull request 工作流。

資料釋出於 2026-10-29

可以用來做什麼

  • 選擇適合專案技術棧的 CI/CD 平台
  • 排查構建失敗或快取失效問題
  • 為移動端簽名或部署整理檢查清單

什麼時候用

  • 需要為專案建立或最佳化 CI/CD 時
  • 能在複製模板前審閱許可權、金鑰和部署目標時
  • 第三方 actions 和執行時能夠固定到已審閱版本時

示例提示詞

以下是根據技能文件生成的示例,不代表實際執行結果。

檢查這份 GitHub Actions 工作流中的許可權和秘密暴露風險,不要執行部署
根據專案棧建議 CI 平台,並區分通用建議與需要驗證的部分
為移動應用簽名流程列出待稽核的金鑰和許可權

月度資料趨勢

累計下載3215
1677250333292026-03 · 累計下載 17912026-05 · 累計下載 25352026-06 · 累計下載 26972026-07 · 累計下載 29392026-08 · 累計下載 30912026-09 · 累計下載 321526-0326-09
星標3
2342026-03 · 星標 32026-05 · 星標 32026-06 · 星標 32026-07 · 星標 32026-08 · 星標 32026-09 · 星標 326-0326-09

2026-09 起統計方法調整:同名技能按作者分別統計,並覆蓋全部技能。圖中虛線為調整前的月份,與之後的資料不直接比較,也不計算跨越調整的增長。

月份累計下載環比星標
2026-093215—3
2026-083091+5.2%3
2026-072939+9.0%3
2026-062697+6.4%3
2026-052535—3
2026-031791—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),按月更新。口徑說明見資料方法。