mgor: Merge upstream master #1417
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: 'mgor: Merge upstream master' | |
on: | |
schedule: | |
- cron: '0 1 * * *' | |
workflow_dispatch: | |
jobs: | |
mgor-merge-upstream: | |
runs-on: ubuntu-latest | |
container: ghcr.io/qmk/qmk_cli:latest | |
if: github.repository == 'mgor/qmk_firmware' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
ref: mgor | |
fetch-depth: 0 | |
- name: Add upstream | |
run: | | |
git config --global --add safe.directory /__w/qmk_firmware/qmk_firmware | |
git config --global user.email "[email protected]" | |
git config --global user.name "Automated by Mikael Göransson" | |
git remote add -f upstream https://github.com/qmk/qmk_firmware | |
git remote -v | |
- name: Fetch and merge upstream | |
run: | | |
git fetch upstream | |
git merge --no-edit upstream/master | awk '/Already up to date/ {exit 1}' || exit 0 | |
- name: Update submodules | |
run: | | |
make git-submodule | |
- name: Push upstream changes | |
run: | | |
git push |