File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -104,16 +104,25 @@ jobs:
104104 body : ${{ steps.changelog_reader.outputs.changes }}
105105 draft : false
106106 prerelease : ${{ env.NBGV_PublicRelease == 'False' }}
107-
108- - name : ⏩ Merge stable with main, push main
107+
108+ - name : ☑ Check if merge of stable to main is possible
109+ shell : bash
109110 continue-on-error : true
111+ run : |
112+ git checkout main
113+ git merge --no-commit --no-ff stable
114+ echo echo "CAN_MERGE_STABLE_WITH_MAIN=$($? == 0)" >> $GITHUB_ENV
115+ git merge --abort
116+
117+ - name : ⏩ Merge stable with main, push main
118+ if : ${{ env.CAN_MERGE_STABLE_WITH_MAIN == true }}
110119 run : |
111120 git checkout main
112121 git merge -S stable
113122 git push origin main
114123
115124 - name : ⏭ Create pull request from stable to main
116- if : ${{ failure() }}
125+ if : ${{ env.CAN_MERGE_STABLE_WITH_MAIN == false }}
117126 uses :
thomaseizinger/[email protected] 118127 env :
119128 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments