Created
July 24, 2022 13:01
-
-
Save Mic92/41ac74e9ba77e61a49392aaab74b1767 to your computer and use it in GitHub Desktop.
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: Automatic merge if CI builds | |
on: | |
push: | |
branches: | |
- 'update/*' | |
jobs: | |
wait-for-check-regexp: | |
runs-on: ubuntu-latest | |
if: github.actor == 'numtide-bot' | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} | |
- name: Wait on tests | |
uses: lewagon/wait-on-check-action@v1.1.2 | |
with: | |
ref: ${{ github.sha }} | |
repo-token: ${{ secrets.GH_TOKEN_FOR_UPDATES }} | |
running-workflow-name: wait-for-check-regexp | |
check-regexp: (check|devShell).+ | |
verbose: true | |
- name: Automerge | |
run: | | |
git config --local user.email "github-actions[bot]@users.noreply.github.com" | |
git config --local user.name "github-actions[bot]" | |
git checkout master | |
git merge ${GITHUB_REF#refs/heads/} | |
# attempt to reduce race condition if some other ci job already pushed in the meantime | |
git pull --rebase origin master | |
git push origin master |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment