Skip to content

Commit 5d86c66

Browse files
committed
feat: add option to force push to protected branches in coverage workflow
1 parent cade325 commit 5d86c66

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

.github/workflows/coverage.yaml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,11 @@ on:
4242
required: false
4343
default: "origin ${{ github.event.pull_request.head.ref }} --set-upstream --force"
4444
type: string
45+
force_push_protected_branch:
46+
description: "Force push to protected branch"
47+
required: false
48+
default: "false"
49+
type: string
4550

4651
jobs:
4752
coverage:
@@ -131,3 +136,11 @@ jobs:
131136
fetch: false
132137
tag_push: '--force'
133138
push: ${{ inputs.push_command }}
139+
140+
- name: Push to protected branch
141+
if: ${{ inputs.force_push_protected_branch }} == 'true'
142+
uses: CasperWA/push-protected@v2
143+
with:
144+
token: ${{ secrets.ALFAC_PUSH_TO_PROTECTED_BRANCH_TOKEN }}
145+
force: true
146+
unprotect_reviews: true

0 commit comments

Comments
 (0)