diff --git a/.github/workflows/update_splink4_merge_branch.yml b/.github/workflows/update_splink4_merge_branch.yml new file mode 100644 index 0000000000..c855f8c29f --- /dev/null +++ b/.github/workflows/update_splink4_merge_branch.yml @@ -0,0 +1,36 @@ +name: update_splink4_merge_branch + +on: + push: + branches: + - master + +jobs: + update-merge-branch: + runs-on: ubuntu-20.04 + steps: + - name: Check out repository + uses: actions/checkout@v3 + with: + ref: master + fetch-depth: 0 + + - name: Check if branch exists already and create if not + run: | + git fetch + if git ls-remote --exit-code --heads origin merge/splink_3_to_4; then + echo "Branch merge/splink_3_to_4 exists" + else + git switch -c merge/splink_3_to_4 + git push -u origin merge/splink_3_to_4 + fi + + - name: Update to-merge branch + run: | + git fetch + git switch merge/splink_3_to_4 + git pull --ff-only + git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" + git config --global user.name "github-actions[bot]" + git merge origin/master + git push origin merge/splink_3_to_4