跳转到主要内容
kitlocal.dev

CI/CD 流水线生成器

本地运行

100% 在你的浏览器中处理。输入和输出绝不会离开你的设备。

生成 GitHub Actions 和 GitLab CI 流水线配置。

流水线执行步骤
GitHub Actions 工作流 YAML
name: Node.js Pipeline

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

jobs:
  build:
    runs-on: ubuntu-latest

    strategy:
      matrix:
        node-version: ["18.x"]

    steps:
    - uses: actions/checkout@v4
    - name: Use Node.js ${{ matrix.node-version }}
      uses: actions/setup-node@v4
      with:
        node-version: ${{ matrix.node-version }}
        cache: 'npm'
    - name: Execute Clean Installation
      run: npm ci
    - name: Run Core Test Boundaries
      run: npm test
    - name: Compile Pipeline Release Target
      run: npm run build
将配置保存到本地 .github/workflows/main.yml