agentsclimarketplace

Ci pipeline setup

Skill ComeOnOliver/skillshub/skills/aiskillstore/marketplace/doyajin174/ci-pipeline-setup

🧠 The right skill, one API call. AI agent skills registry with token-efficient skill resolution. 5,000+ skills from 500+ top repos.

Install
npx -y skills add ComeOnOliver/skillshub --skill ci-pipeline-setup

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

What its author says it does

Copied from the file, not written here

Set up CI/CD pipelines with GitHub Actions. Use when creating new projects, adding automation, or when manual verification becomes bottleneck. Covers lint, test, build, deploy automation.

The file declares its own license as MIT. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.

SKILL.md

8.9 KB, as published. Nobody here has run it

CI Pipeline Setup

GitHub Actionsλ₯Ό μ΄μš©ν•œ CI/CD νŒŒμ΄ν”„λΌμΈ μ„€μ • μŠ€ν‚¬μž…λ‹ˆλ‹€.

Core Principle

"verification-before-completion을 λ‘œμ»¬μ—μ„œλ§Œ ν•˜μ§€ 말고, 원격 μ €μž₯μ†Œμ—μ„œ μžλ™μœΌλ‘œ κ°•μ œν•œλ‹€." "λ¨Έμ§€ 전에 CIκ°€ 톡과해야 ν•œλ‹€ = μ‹œμŠ€ν…œμœΌλ‘œ κ°•μ œ"

ν•„μˆ˜ νŒŒμ΄ν”„λΌμΈ 단계

단계λͺ©μ μ‹€νŒ¨ μ‹œ
Lintμ½”λ“œ μŠ€νƒ€μΌ 일관성PR λ¨Έμ§€ 차단
Type Checkνƒ€μž… μ•ˆμ „μ„± 검증PR λ¨Έμ§€ 차단
TestκΈ°λŠ₯ μ •ν™•μ„± 검증PR λ¨Έμ§€ 차단
BuildλΉŒλ“œ κ°€λŠ₯ μ—¬λΆ€ 확인PR λ¨Έμ§€ 차단
Security취약점 μŠ€μΊ”PR λ¨Έμ§€ 차단

κΈ°λ³Έ CI μ›Œν¬ν”Œλ‘œμš°

.github/workflows/ci.yml

name: CI

on:
  push:
    branches: [main, develop]
  pull_request:
    branches: [main, develop]

# λ™μ‹œ μ‹€ν–‰ μ œμ–΄ (같은 PR에 μƒˆ 컀밋 μ‹œ 이전 μ‹€ν–‰ μ·¨μ†Œ)
concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  # ================================
  # 1. μ½”λ“œ ν’ˆμ§ˆ 검사
  # ================================
  lint:
    name: Lint & Format
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run ESLint
        run: npm run lint

      - name: Check formatting
        run: npm run format:check

  # ================================
  # 2. νƒ€μž… 검사
  # ================================
  typecheck:
    name: Type Check
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run TypeScript
        run: npm run typecheck

  # ================================
  # 3. ν…ŒμŠ€νŠΈ
  # ================================
  test:
    name: Test
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run tests
        run: npm test -- --coverage

      - name: Upload coverage
        uses: codecov/codecov-action@v4
        with:
          token: ${{ secrets.CODECOV_TOKEN }}
          fail_ci_if_error: false

  # ================================
  # 4. λΉŒλ“œ
  # ================================
  build:
    name: Build
    runs-on: ubuntu-latest
    needs: [lint, typecheck, test]
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Build
        run: npm run build

      - name: Upload build artifact
        uses: actions/upload-artifact@v4
        with:
          name: build
          path: .next/
          retention-days: 7

  # ================================
  # 5. λ³΄μ•ˆ μŠ€μΊ”
  # ================================
  security:
    name: Security Audit
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4

      - name: Setup Node.js
        uses: actions/setup-node@v4
        with:
          node-version: '20'
          cache: 'npm'

      - name: Install dependencies
        run: npm ci

      - name: Run npm audit
        run: npm audit --audit-level=high

package.json 슀크립트

{
  "scripts": {
    "dev": "next dev",
    "build": "next build",
    "start": "next start",
    "lint": "eslint . --ext .ts,.tsx",
    "lint:fix": "eslint . --ext .ts,.tsx --fix",
    "format": "prettier --write .",
    "format:check": "prettier --check .",
    "typecheck": "tsc --noEmit",
    "test": "vitest",
    "test:ci": "vitest --run --coverage"
  }
}

Branch Protection Rules

GitHub μ„€μ • 방법

Settings β†’ Branches β†’ Add rule

Branch name pattern: main

βœ… Require a pull request before merging
  βœ… Require approvals (μ΅œμ†Œ 1λͺ…)
  βœ… Dismiss stale pull request approvals when new commits are pushed

βœ… Require status checks to pass before merging
  βœ… Require branches to be up to date before merging
  Status checks:
    - lint
    - typecheck
    - test
    - build
    - security

βœ… Require conversation resolution before merging
βœ… Do not allow bypassing the above settings

branch-protection.yml (μžλ™ μ„€μ •μš©)

# .github/branch-protection.yml
branches:
  - name: main
    protection:
      required_pull_request_reviews:
        required_approving_review_count: 1
        dismiss_stale_reviews: true
      required_status_checks:
        strict: true
        contexts:
          - lint
          - typecheck
          - test
          - build
          - security
      enforce_admins: true
      restrictions: null

κ³ κΈ‰ νŒ¨ν„΄

Matrix λΉŒλ“œ (닀쀑 ν™˜κ²½)

jobs:
  test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version: [18, 20, 22]
    steps:
      - uses: actions/checkout@v4
      - uses: actions/setup-node@v4
        with:
          node-version: ${{ matrix.node-version }}
      - run: npm ci
      - run: npm test

μΊμ‹œ μ΅œμ ν™”

- name: Cache node_modules
  uses: actions/cache@v4
  with:
    path: node_modules
    key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
    restore-keys: |
      ${{ runner.os }}-node-

PR 라벨 μžλ™ν™”

# .github/workflows/labeler.yml
name: Labeler

on:
  pull_request:
    types: [opened, synchronize]

jobs:
  label:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/labeler@v5
        with:
          repo-token: ${{ secrets.GITHUB_TOKEN }}

μ˜μ‘΄μ„± μžλ™ μ—…λ°μ΄νŠΈ (Dependabot)

# .github/dependabot.yml
version: 2
updates:
  - package-ecosystem: "npm"
    directory: "/"
    schedule:
      interval: "weekly"
    open-pull-requests-limit: 10
    labels:
      - "dependencies"
    groups:
      dev-dependencies:
        patterns:
          - "@types/*"
          - "eslint*"
          - "prettier*"

배포 νŒŒμ΄ν”„λΌμΈ (CD)

Vercel μžλ™ 배포

# .github/workflows/deploy.yml
name: Deploy

on:
  push:
    branches: [main]

jobs:
  deploy:
    runs-on: ubuntu-latest
    needs: [lint, typecheck, test, build]
    steps:
      - uses: actions/checkout@v4

      - name: Deploy to Vercel
        uses: amondnet/vercel-action@v25
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          vercel-args: '--prod'

Preview 배포 (PR별)

# PRμ—μ„œ μžλ™μœΌλ‘œ Preview URL 생성
on:
  pull_request:

jobs:
  preview:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - uses: amondnet/vercel-action@v25
        with:
          vercel-token: ${{ secrets.VERCEL_TOKEN }}
          vercel-org-id: ${{ secrets.VERCEL_ORG_ID }}
          vercel-project-id: ${{ secrets.VERCEL_PROJECT_ID }}
          # --prod μ—†μŒ = Preview 배포

Workflow 파일 ꡬ쑰

.github/
β”œβ”€β”€ workflows/
β”‚   β”œβ”€β”€ ci.yml           # 메인 CI (lint, test, build)
β”‚   β”œβ”€β”€ deploy.yml       # ν”„λ‘œλ•μ…˜ 배포
β”‚   β”œβ”€β”€ preview.yml      # PR Preview 배포
β”‚   └── labeler.yml      # 라벨 μžλ™ν™”
β”œβ”€β”€ dependabot.yml       # μ˜μ‘΄μ„± μ—…λ°μ΄νŠΈ
β”œβ”€β”€ CODEOWNERS           # μ½”λ“œ μ†Œμœ μž
└── PULL_REQUEST_TEMPLATE.md

Checklist

μƒˆ ν”„λ‘œμ νŠΈ

  • .github/workflows/ci.yml 생성
  • package.json 슀크립트 μ •μ˜ (lint, typecheck, test, build)
  • Branch Protection Rules μ„€μ •
  • Dependabot μ„€μ •
  • CODEOWNERS 파일 생성

CI ν’ˆμ§ˆ

  • λͺ¨λ“  PRμ—μ„œ CI ν•„μˆ˜ 톡과
  • μΊμ‹œ μ΅œμ ν™”λ‘œ λΉŒλ“œ μ‹œκ°„ 단좕
  • 병렬 μ‹€ν–‰μœΌλ‘œ νš¨μœ¨μ„± 증가
  • μ‹€νŒ¨ μ‹œ λͺ…ν™•ν•œ μ—λŸ¬ λ©”μ‹œμ§€

λ³΄μ•ˆ

  • SecretsλŠ” GitHub Secretsμ—λ§Œ μ €μž₯
  • npm audit μžλ™ μ‹€ν–‰
  • μ˜μ‘΄μ„± μžλ™ μ—…λ°μ΄νŠΈ ν™œμ„±ν™”

References

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.