include: # 包含node、git的远程开发流水线模版 - https://cnb.cool/cnb/plugins/node-git-dev/-/blob/main/.node-git-dev.yml .upload_plugin_info: &upload_plugin_info - docker: image: tencentcom/node-git-dev stages: - name: install script: npm install --production --registry https://mirrors.cloud.tencent.com/help/npm.html - name: download plugin files if: | [ "$CNB_EVENT" = "api_trigger_upload_plugin_info" ] script: node ./src/down.js -token=$CNB_TOKEN -path=$PLUGIN_PATH -slug=$API_TRIGGER_REPO_SLUG -ref=$API_TRIGGER_BRANCH - name: gather plugins script: node ./src/gather.js -prefix=$CNB_WEB_ENDPOINT/$CNB_REPO_SLUG/-/git/raw/$CNB_BRANCH/plugins/ -ref=$API_TRIGGER_BRANCH - name: add plugins info script: - ./commit.sh main: push: *upload_plugin_info api_trigger_upload_plugin_info: *upload_plugin_info