Skip to content

Commit

Permalink
build: add GH workflow to sync alpha with master automatically (#2030)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamstankiewicz committed Feb 20, 2023
1 parent c702920 commit fd933d2
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 2 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/analyze-dependents.yml
Original file line number Diff line number Diff line change
Expand Up @@ -280,9 +280,9 @@ jobs:
uses: hmarr/auto-approve-action@v2
with:
pull-request-number: ${{ steps.cpr.outputs.pull-request-number }}
github-token: ${{ secrets.EDX_NETLIFY_PAT }}
github-token: ${{ secrets.requirements_bot_github_token }}
- name: Auto-merge pull request for dependent project usages
uses: pascalgn/automerge-action@v0.14.3
env:
GITHUB_TOKEN: ${{ secrets.EDX_NETLIFY_PAT }}
GITHUB_TOKEN: ${{ secrets.requirements_bot_github_token }}
MERGE_METHOD: squash
30 changes: 30 additions & 0 deletions .github/workflows/sync-alpha-master.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Sync alpha with master
on:
push:
branches:
- master

jobs:
sync-branches:
runs-on: ubuntu-latest
name: Syncing branches
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set up Node
uses: actions/setup-node@v1
with:
node-version: 18
- name: Create Pull Request
id: cpr
uses: tretuna/sync-branches@1.4.0
with:
GITHUB_TOKEN: ${{ secrets.requirements_bot_github_token }}
FROM_BRANCH: "master"
TO_BRANCH: "alpha"
- name: Enable Pull Request Auto Merge
uses: peter-evans/enable-pull-request-automerge@v2
with:
token: ${{ secrets.requirements_bot_github_token }}
pull-request-number: ${{ steps.cpr.outputs.PULL_REQUEST_NUMBER }}
merge-method: squash

0 comments on commit fd933d2

Please sign in to comment.