Skip to content

Commit

Permalink
[CI] Temporarily enable force pushes in release workflow (#322)
Browse files Browse the repository at this point in the history
explicitly enable + disable force pushes instead of using protected-branch plugin
  • Loading branch information
alyssadai authored Jul 19, 2024
1 parent 2d4fae7 commit 6ec32f2
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 3 deletions.
1 change: 0 additions & 1 deletion .autorc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
"plugins": [
"git-tag",
"released",
"protected-branch",
"first-time-contributor",
[
"omit-commits",
Expand Down
21 changes: 19 additions & 2 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,25 @@ jobs:
wget -O- "$auto_download_url" | gunzip > ~/auto
chmod a+x ~/auto
# Workaround to avoid PRs for CHANGELOG updates
# Adapted from https://github.com/intuit/auto/issues/1491#issuecomment-1610120918
- name: Temporarily allow force pushes
uses: benjefferies/branch-protection-bot@master
if: always()
with:
access_token: ${{ secrets.NB_PAT_RELEASE_PROTECTED }}
branch: ${{ github.event.repository.default_branch }}

- name: Release
run: ~/auto shipit -vv
env:
GH_TOKEN: ${{ secrets.NB_PAT_RELEASE }}
PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.NB_PAT_RELEASE_PROTECTED }}
GH_TOKEN: ${{ secrets.NB_PAT_RELEASE_PROTECTED }}
# GH_TOKEN: ${{ secrets.NB_PAT_RELEASE }}
# PROTECTED_BRANCH_REVIEWER_TOKEN: ${{ secrets.NB_PAT_RELEASE_PROTECTED }}

- name: Disable allow force pushes
uses: benjefferies/branch-protection-bot@master
if: always()
with:
access_token: ${{ secrets.NB_PAT_RELEASE_PROTECTED }}
branch: ${{ github.event.repository.default_branch }}

0 comments on commit 6ec32f2

Please sign in to comment.