-
Notifications
You must be signed in to change notification settings - Fork 55
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add automation for syncing latest branch w development (#829)
- Loading branch information
Showing
2 changed files
with
37 additions
and
1 deletion.
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
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,36 @@ | ||
name: Sync latest | ||
|
||
on: | ||
push: | ||
branches: [develop] | ||
|
||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
publish: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: checkout | ||
uses: actions/checkout@v3 | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Merge Branches | ||
run: | | ||
git config user.name github-actions | ||
git config user.email github-actions@github.com | ||
git fetch | ||
git checkout develop | ||
git pull | ||
git checkout latest | ||
git pull | ||
git merge develop | ||
# note that this shouldn't run if 'merge branches' fails, which it will happen when | ||
# there are merge conflicts. | ||
- name: Sync latest | ||
if: contains(github.event.pull_request.labels.*.name, 'sync-latest') | ||
run: | | ||
git push |