Skip to content

Auto-merge

Auto-merge #229

Workflow file for this run

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