Skip to content
This repository has been archived by the owner on Dec 6, 2024. It is now read-only.

Commit

Permalink
fix: bypass develop protection when adding beta (#725)
Browse files Browse the repository at this point in the history
  • Loading branch information
maghirardelli authored Sep 28, 2021
1 parent 6d545dd commit fe4c0ff
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/deploy-integ.yml
Original file line number Diff line number Diff line change
Expand Up @@ -155,5 +155,26 @@ jobs:
with:
token: ${{ secrets.MERGE_TOKEN }}
fetch-depth: 0
# There's no way for github actions to push to a protected branch. This is a workaround
# See https://github.uint.cloudmunity/t/how-to-push-to-protected-branches-in-a-github-action/16101/30
- name: Temporarily disable branch protection
uses: octokit/request-action@v2.x
with:
route: DELETE /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
owner: awslabs
repo: service-workbench-on-aws
branch: develop
env:
GITHUB_TOKEN: ${{ secrets.MERGE_TOKEN }}
- name: Check if Beta is present and add if not
run: ./scripts/check-and-add-beta.sh
- name: Enable branch protection
uses: octokit/request-action@v2.x
if: always() # Make sure to enable branch protection even if other steps fail
with:
route: POST /repos/{owner}/{repo}/branches/{branch}/protection/enforce_admins
owner: awslabs
repo: service-workbench-on-aws
branch: develop
env:
GITHUB_TOKEN: ${{ secrets.MERGE_TOKEN }}

0 comments on commit fe4c0ff

Please sign in to comment.