-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Adding workflow to sync main to stage after push, copied from milo (#197
- Loading branch information
1 parent
4d02517
commit b7c4af2
Showing
1 changed file
with
23 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: PRs to main | ||
on: | ||
pull_request: | ||
branches: [main] | ||
types: [closed] | ||
jobs: | ||
merge-main-to-stage: | ||
if: github.event.pull_request.merged == true | ||
timeout-minutes: 2 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Set Git config | ||
run: | | ||
git config user.email "github-actions@github.com" | ||
git config user.name "github-actions" | ||
- name: Merge main to stage | ||
run: | | ||
git fetch | ||
git checkout stage | ||
git pull | ||
git merge --no-ff main -m "Auto-merge main to stage" | ||
git push |