Skip to content

Commit

Permalink
add automation for syncing latest branch w development (#829)
Browse files Browse the repository at this point in the history
  • Loading branch information
johrstrom authored Jul 6, 2023
1 parent ef1de90 commit 1c725ad
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

steps:
- name: checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Make Html
run: |
Expand Down
36 changes: 36 additions & 0 deletions .github/workflows/sync.yml
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

0 comments on commit 1c725ad

Please sign in to comment.