gitlab-workflow by mindrally/skills
npx skills add https://github.com/mindrally/skills --skill gitlab-workflow您是 GitLab 工作流方面的专家,包括合并请求、CI/CD 流水线、问题跟踪和 DevOps 最佳实践。
.gitlab-ci.yml 实现全面的 CI/CD 流水线保持合并请求小而专注
合并请求标题规范
feat: add user authenticationfeat: add login page (#123)合并请求描述模板
简要描述此合并请求完成的内容。
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
## 变更
- 具体变更列表
## 测试
- 变更如何被测试
- 要运行的测试命令
## 检查清单
- [ ] 已添加/更新测试
- [ ] 已更新文档
- [ ] 流水线通过
## 相关问题
关闭 #123
4. 正确关联问题
* 使用 `Closes #123` 在合并时自动关闭问题
* 使用 `Related to #123` 用于引用但不关闭的情况
对进行中的工作使用草稿合并请求:
Draft: 或使用草稿按钮stages:
- build
- test
- security
- deploy
variables:
NODE_VERSION: "20"
default:
image: node:${NODE_VERSION}
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
build:
stage: build
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 week
test:
stage: test
script:
- npm ci
- npm test
coverage: '/Coverage: \d+\.\d+%/'
lint:
stage: test
script:
- npm ci
- npm run lint
allow_failure: false
test:
stage: test
parallel: 3
script:
- npm ci
- npm test -- --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
deploy:production:
stage: deploy
script:
- ./deploy.sh production
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manual
- when: never
environment:
name: production
url: https://example.com
.test_template: &test_template
stage: test
before_script:
- npm ci
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
unit_tests:
<<: *test_template
script:
- npm run test:unit
integration_tests:
<<: *test_template
script:
- npm run test:integration
services:
- postgres:15
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
- template: Security/Container-Scanning.gitlab-ci.yml
sast:
stage: security
dependency_scanning:
stage: security
secret_detection:
stage: security
.deploy_template:
stage: deploy
script:
- ./deploy.sh $ENVIRONMENT
environment:
name: $ENVIRONMENT
url: https://$ENVIRONMENT.example.com
deploy:staging:
extends: .deploy_template
variables:
ENVIRONMENT: staging
rules:
- if: $CI_COMMIT_BRANCH == "develop"
deploy:production:
extends: .deploy_template
variables:
ENVIRONMENT: production
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manual
feature/描述staging、production在 .gitlab/issue_templates/ 中创建:
Bug.md:
## 描述
对错误的清晰描述。
## 重现步骤
1. 第一步
2. 第二步
## 预期与实际行为
- 预期:
- 实际:
## 环境
- 浏览器:
- 操作系统:
- 版本:
/label ~bug ~needs-triage
Feature.md:
## 问题陈述
描述此功能解决的问题。
## 提议的解决方案
描述您提议的解决方案。
## 验收标准
- [ ] 标准 1
- [ ] 标准 2
/label ~feature ~needs-refinement
使用标签进行组织:
~bug、~feature、~documentation~priority::high、~priority::medium、~priority::low~workflow::ready、~workflow::in-progress、~workflow::review~team::backend、~team::frontend为主分支配置:
# 使用受保护和掩码的变量
variables:
DEPLOY_TOKEN:
value: ""
description: "部署身份验证令牌"
在 设置 > CI/CD > 变量 中配置:
启用合规性功能:
如需快速设置,启用自动 DevOps:
include:
- template: Auto-DevOps.gitlab-ci.yml
variables:
AUTO_DEVOPS_PLATFORM_TARGET: ECS
POSTGRES_ENABLED: "true"
包含的功能:
每周安装次数
318
仓库
GitHub 星标数
42
首次出现
2026年1月25日
安全审计
安装于
gemini-cli301
opencode301
cursor298
codex295
github-copilot292
amp288
You are an expert in GitLab workflows, including merge requests, CI/CD pipelines, issue tracking, and DevOps best practices.
.gitlab-ci.ymlKeep MRs small and focused
MR Title Convention
feat: add user authenticationfeat: add login page (#123)MR Description Template
Brief description of what this MR accomplishes.
## Changes
- List of specific changes
## Testing
- How changes were tested
- Test commands to run
## Checklist
- [ ] Tests added/updated
- [ ] Documentation updated
- [ ] Pipeline passes
## Related Issues
Closes #123
4. Link issues properly
* Use `Closes #123` to auto-close issues on merge
* Use `Related to #123` for references without closing
Use Draft MRs for work in progress:
Draft: or use the Draft buttonstages:
- build
- test
- security
- deploy
variables:
NODE_VERSION: "20"
default:
image: node:${NODE_VERSION}
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
build:
stage: build
script:
- npm ci
- npm run build
artifacts:
paths:
- dist/
expire_in: 1 week
test:
stage: test
script:
- npm ci
- npm test
coverage: '/Coverage: \d+\.\d+%/'
lint:
stage: test
script:
- npm ci
- npm run lint
allow_failure: false
test:
stage: test
parallel: 3
script:
- npm ci
- npm test -- --shard=$CI_NODE_INDEX/$CI_NODE_TOTAL
deploy:production:
stage: deploy
script:
- ./deploy.sh production
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manual
- when: never
environment:
name: production
url: https://example.com
.test_template: &test_template
stage: test
before_script:
- npm ci
cache:
key: ${CI_COMMIT_REF_SLUG}
paths:
- node_modules/
unit_tests:
<<: *test_template
script:
- npm run test:unit
integration_tests:
<<: *test_template
script:
- npm run test:integration
services:
- postgres:15
include:
- template: Security/SAST.gitlab-ci.yml
- template: Security/Dependency-Scanning.gitlab-ci.yml
- template: Security/Secret-Detection.gitlab-ci.yml
- template: Security/Container-Scanning.gitlab-ci.yml
sast:
stage: security
dependency_scanning:
stage: security
secret_detection:
stage: security
.deploy_template:
stage: deploy
script:
- ./deploy.sh $ENVIRONMENT
environment:
name: $ENVIRONMENT
url: https://$ENVIRONMENT.example.com
deploy:staging:
extends: .deploy_template
variables:
ENVIRONMENT: staging
rules:
- if: $CI_COMMIT_BRANCH == "develop"
deploy:production:
extends: .deploy_template
variables:
ENVIRONMENT: production
rules:
- if: $CI_COMMIT_BRANCH == "main"
when: manual
feature/descriptionstaging, productionCreate in .gitlab/issue_templates/:
Bug.md:
## Description
Clear description of the bug.
## Steps to Reproduce
1. Step one
2. Step two
## Expected vs Actual Behavior
- Expected:
- Actual:
## Environment
- Browser:
- OS:
- Version:
/label ~bug ~needs-triage
Feature.md:
## Problem Statement
Describe the problem this feature solves.
## Proposed Solution
Describe your proposed solution.
## Acceptance Criteria
- [ ] Criterion 1
- [ ] Criterion 2
/label ~feature ~needs-refinement
Organize with labels:
~bug, ~feature, ~documentation~priority::high, ~priority::medium, ~priority::low~workflow::ready, ~workflow::in-progress, ~workflow::review~team::backend, ~team::frontendConfigure for main:
# Use protected and masked variables
variables:
DEPLOY_TOKEN:
value: ""
description: "Deployment authentication token"
Configure in Settings > CI/CD > Variables:
Enable compliance features:
For quick setup, enable Auto DevOps:
include:
- template: Auto-DevOps.gitlab-ci.yml
variables:
AUTO_DEVOPS_PLATFORM_TARGET: ECS
POSTGRES_ENABLED: "true"
Features included:
Weekly Installs
318
Repository
GitHub Stars
42
First Seen
Jan 25, 2026
Security Audits
Gen Agent Trust HubPassSocketPassSnykPass
Installed on
gemini-cli301
opencode301
cursor298
codex295
github-copilot292
amp288
Azure Data Explorer (Kusto) 查询技能:KQL数据分析、日志遥测与时间序列处理
100,500 周安装
Botchan:Base区块链智能体消息层,实现无需许可的链上通信
308 周安装
Worktrunk CLI 工具:高效管理 Git Worktree,自动化开发工作流
308 周安装
viem 集成指南:为 TypeScript/JavaScript 应用连接 EVM 区块链
308 周安装
Appwrite TypeScript SDK 使用指南 - 客户端与服务器端开发教程
309 周安装
React Native 棕地迁移指南:逐步集成到原生应用(Expo/裸RN)
309 周安装
best-minds:基于专家模拟的AI提问框架,提升LLM回答质量与专业性
309 周安装