.upload_plugin_info: &upload_plugin_info - docker: build: .ide/Dockerfile stages: - name: install script: npm install --production --registry=https://mirrors.cloud.tencent.com/help/npm.html - name: gather plugins script: node ./src/gather.js -prefix=$CNB_WEB_ENDPOINT/$CNB_REPO_SLUG/-/git/raw/$CNB_BRANCH/plugins/ - name: commit plugins if: | git_status=$(git status --porcelain) echo "$git_status" if [[ -n $git_status ]]; then exit 0 else exit 1 fi script: - git add . - git commit -m "update plugins by ci" # ci.skip 避免push再次构建造成循环 - git push origin main -o ci.skip main: push: *upload_plugin_info pull_request: lint: name: lint stages: - name: do commitlint image: tencentcom/commitlint - name: tencentcom/markdown-lint image: tencentcom/markdown-lint commands: - markdownlint README.md - name: 添加评审人 type: git:reviewer options: type: add-reviewer count: 2 exports: reviewersForAt: CURR_REVIEWER_FOR_AT - name: notify imports: https://cnb.cool/cnb/secrets/-/blob/main/envs/wework-robots.yml image: tencentcom/wecom-message settings: robot: $OCI_REVIEW_ROBOT content: | ${CNB_PULL_REQUEST_TITLE} [${CNB_EVENT_URL}](${CNB_EVENT_URL}) ${CURR_REVIEWER_FOR_AT} from ${CNB_BUILD_USER} pull_request.mergeable: - stages: - name: CR 通过后自动合并 type: git:auto-merge options: mergeType: squash removeSourceBranch: true $: vscode: - services: - docker - vscode docker: # 直接沿用以前的默认镜像 build: .ide/Dockerfile volumes: - node_modules stages: - name: install script: - npm config set registry http://mirrors.cloud.tencent.com/npm/ - npm install