fix sync workflow (#833) #2
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
name: Sync latest | |
on: | |
push: | |
branches: [develop] | |
defaults: | |
run: | |
shell: bash | |
jobs: | |
publish: | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v3 | |
with: | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Merge Branches | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
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 |