main: push: - services: - docker stages: - name: docker login script: docker login -u ${CNB_TOKEN_USER_NAME} -p "${CNB_TOKEN}" ${CNB_DOCKER_REGISTRY} - name: docker build script: docker build -t ${CNB_DOCKER_REGISTRY}/${CNB_REPO_SLUG_LOWERCASE}:24.5.1 . - name: docker push script: docker push ${CNB_DOCKER_REGISTRY}/${CNB_REPO_SLUG_LOWERCASE}:24.5.1 # 匹配以 release 开头的分支名 release*: # 自定义按钮可触发的事件 web_trigger_one: stages: - name: 测试release script: echo "测试release" # 匹配以 dev 开头的分支名 dev*: web_trigger_two: stages: - name: 测试dev01 script: echo "测试dev01" web_trigger_three: stages: - name: 测试dev02 script: echo "测试dev02" # 匹配所有分支名 "**": web_trigger_four: - docker: # 通过此参数控制使用的 image image: node:22 stages: - name: 依赖安装 script: npm -v