Azure管道,在经过批准后,分支外部运作正常,但无法分支回来。
创始人
2024-09-29 19:00:26
0

可能是由于缺少'条件”的原因,您可以通过在管道中添加条件来解决这个问题。以下是一个示例:

trigger:
- master

pool:
  vmImage: 'ubuntu-latest'

steps:
- script: echo "This is the main pipeline."
  displayName: 'Main pipeline'

- ${{ if eq(variables['Build.SourceBranch'], 'refs/heads/feature/my-new-feature') }}:
  - script: echo "This feature has been approved and needs to be merged back into master."
    displayName: 'Approved feature'
  - script: |
      git checkout master
      git merge --no-ff feature/my-new-feature #Merge without fast-forward
      git push origin master
    displayName: 'Merge feature into master'

在以上示例中,添加了一个条件语句'${{ if eq(variables['Build.SourceBranch'], 'refs/heads/feature/my-new-feature') }}”,以确定当前分支是否为'feature/my-new-feature”。如果是,就会运行相应的步骤,将代码合并回主分支(即'master”分支)。这个条件语句可以根据您的实际需要进行更改。

相关内容

热门资讯

分享一款!pokemmo脚本最... 分享一款!pokemmo脚本最新版,如何下载wepoker安装包,我来教教你(有挂辅助);人气非常高...
科技通报!pokerworld... 科技通报!pokerworld软件,hhpoker是正规的吗,透明挂教程(有挂技巧);支持2-10人...
推荐十款!wepoker网页版... 推荐十款!wepoker网页版透视方法,hhpoker软件可以玩吗,黑科技教程(有挂技巧);《WPK...
发现一款!wepoker有辅助... 此外,数据分析德州(wepoker有辅助功能吗)辅助神器app还具备辅助透视行为开挂功能,通过对客户...
发现玩家!pokemmo辅助工... 《发现玩家!pokemmo辅助工具,佛手在线大菠萝智能辅助器,安装教程(有挂神器)》 佛手在线大菠萝...
揭秘一下!wepoker开脚本... 《揭秘一下!wepoker开脚本视频,哈糖大菠萝辅助器,曝光教程(有挂透明)》 哈糖大菠萝辅助器软件...
带你了解!pokemomo辅助... 1、带你了解!pokemomo辅助工具,wejoker透视方法,曝光教程(有挂教程)2、进入游戏-大...
热点讨论!wepoker正确养... 1、热点讨论!wepoker正确养号方法,约局吧透视挂下载,德州教程(有挂技巧)。2、wepoker...
分享开挂内幕!hhpoker可... 1、分享开挂内幕!hhpoker可以开挂吗,werplan怎么作弊,详细教程(有挂软件);详细教程。...
2024教程!德普之星辅助器怎... 《2024教程!德普之星辅助器怎么用,约局吧app有挂吗,透牌教程(有挂透视)》 德普之星辅助器怎么...