Auto-merge #229
This file contains hidden or 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: Auto-merge | |
on: | |
workflow_run: | |
workflows: [Build] | |
branches: [auto-merge] | |
types: [completed] | |
jobs: | |
on-success: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Tell git we want the `auto-merge` branch | |
run: git remote set-branches --add origin ${{ github.event.workflow_run.head_branch }} | |
- name: Fetch the target branch | |
run: git fetch --shallow-since="`git show --no-patch --format=%ci HEAD`" | |
- name: Checkout target branch | |
run: git checkout ${{ github.event.workflow_run.head_branch }} | |
- name: Push current head to main | |
run: git push -v origin HEAD:main | |