Skip to main content
Glama
ci.yaml1.6 kB
name: CI on: pull_request: branches: - main - dev jobs: check: runs-on: ubuntu-latest steps: - name: Checkout 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: Type check run: npm run typecheck - name: Lint run: npm run lint || true - name: Build run: npm run build - name: Test run: npm test || true validate-pr: runs-on: ubuntu-latest steps: - name: Validate PR target branch run: | BASE_BRANCH="${{ github.base_ref }}" HEAD_BRANCH="${{ github.head_ref }}" echo "PR: $HEAD_BRANCH -> $BASE_BRANCH" # main 分支只接受 dev 或 hotfix/* 分支的 PR if [ "$BASE_BRANCH" = "main" ]; then if [[ "$HEAD_BRANCH" != "dev" && "$HEAD_BRANCH" != hotfix/* ]]; then echo "::error::main 分支只接受 dev 或 hotfix/* 分支的 PR" exit 1 fi fi # dev 分支只接受 feature/*, bugfix/*, fix/* 分支的 PR if [ "$BASE_BRANCH" = "dev" ]; then if [[ "$HEAD_BRANCH" != feature/* && "$HEAD_BRANCH" != bugfix/* && "$HEAD_BRANCH" != fix/* && "$HEAD_BRANCH" != feat/* ]]; then echo "::error::dev 分支只接受 feature/*, bugfix/*, fix/*, feat/* 分支的 PR" exit 1 fi fi echo "✓ PR 分支验证通过"

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/SupenBysz/gitea-mcp-tool'

If you have feedback or need assistance with the MCP directory API, please join our Discord server