Skip to content

Commit 46e2fc4

Browse files
Copilotpetesramek
andauthored
Restore Lock target branch step in promote-branch workflow
Agent-Logs-Url: https://github.com/petesramek/polyline-algorithm-csharp/sessions/54e03ed7-d624-48df-a9a1-d8f0a44801b7 Co-authored-by: petesramek <2333452+petesramek@users.noreply.github.com>
1 parent a38f7b8 commit 46e2fc4

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

.github/workflows/promote-branch.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -205,6 +205,12 @@ jobs:
205205
run: |
206206
git fetch origin
207207
git push origin origin/${{ env.base-branch }}:refs/heads/${{ env.target-branch }}
208+
- name: 'Lock target branch'
209+
if: ${{ needs.workflow-variables.outputs.target-branch-exists == 'false' }}
210+
uses: './.github/actions/github/branch-protection/lock'
211+
with:
212+
branch: ${{ needs.workflow-variables.outputs.target-branch }}
213+
token: ${{ secrets.GH_ADMIN_TOKEN }}
208214
- name: 'Create PR: "Promote ${{ env.current-branch }} to ${{ env.target-branch }}"'
209215
if: ${{ needs.workflow-variables.outputs.pull-request-exists == 'false' }}
210216
env:

0 commit comments

Comments
 (0)