File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -206,13 +206,12 @@ jobs:
206206 dotnet-version : ${{ env.dotnet-sdk-version }}
207207 - name : ' Create target branch'
208208 if : ${{ needs.workflow-variables.outputs.target-branch-exists == 'false' }}
209+ env :
210+ base-branch : ${{ needs.workflow-variables.outputs.base-branch }}
211+ target-branch : ${{ needs.workflow-variables.outputs.target-branch }}
209212 run : |
210- git config user.name "$(git log -n 1 --pretty=format:%an)"
211- git config user.email "$(git log -n 1 --pretty=format:%ae)"
212213 git fetch origin
213- git switch ${{ needs.workflow-variables.outputs.base-branch }}
214- git checkout -b ${{ needs.workflow-variables.outputs.target-branch }} origin/${{ needs.workflow-variables.outputs.target-branch }} || git checkout -b ${{ needs.workflow-variables.outputs.target-branch }}
215- git push --set-upstream origin ${{ needs.workflow-variables.outputs.target-branch }}
214+ git push origin origin/${{ env.base-branch }}:refs/heads/${{ env.target-branch }}
216215 - name : ' Lock target branch'
217216 if : ${{ needs.workflow-variables.outputs.target-branch-exists == 'false' }}
218217 uses : ' ./.github/actions/github/branch-protection/lock'
You can’t perform that action at this time.
0 commit comments