Skip to content

Commit bc566cc

Browse files
authored
fix(ci): temporarily disable 'include administrators' branch protection for automated tasks
1 parent 57c7636 commit bc566cc

File tree

1 file changed

+18
-1
lines changed

1 file changed

+18
-1
lines changed

.github/workflows/release-tag.yml

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ jobs:
1515
-
1616
name: Checkout
1717
uses: actions/checkout@v2.3.4
18+
-
19+
name: Temporarily disable "include administrators" branch protection
20+
if: ${{ always() && github.ref == 'refs/heads/main' }}
21+
id: disable_include_admins
22+
uses: benjefferies/branch-protection-bot@1.0.7
23+
with:
24+
access_token: ${{ secrets.REPO_GHA_PAT }}
25+
branch: main
26+
enforce_admins: false
1827
-
1928
name: Create tag
2029
if: github.event.pull_request.merged == true && startsWith(${{ github.head_ref }}, "release/v")
@@ -23,4 +32,12 @@ jobs:
2332
token: ${{ secrets.REPO_GHA_PAT }}
2433
version_regex: '^Version tag to ([0-9]+\.[0-9]+\.[0-9]+)'
2534
version_tag_prefix: v
26-
dry_run: false
35+
dry_run: false
36+
-
37+
name: Enable "include administrators" branch protection
38+
uses: benjefferies/branch-protection-bot@1.0.7
39+
if: ${{ always() && github.ref == 'refs/heads/main' }}
40+
with:
41+
access_token: ${{ secrets.REPO_GHA_PAT }}
42+
branch: main
43+
enforce_admins: ${{ steps.disable_include_admins.outputs.initial_status }}

0 commit comments

Comments
 (0)