I made some changes to the automerging workflow for repositories that rely on unit tests.
name: Automerge (Dependabot)
on: [pull_request]
jobs:
automerge:
runs-on: ubuntu-20.04
if: github.actor == 'dependabot[bot]'
steps:
- name: wait for unit tests to pass
uses: fountainhead/action-wait-for-check@v1.0.0
id: wait-for-unit-tests
with:
token: ${{ secrets.GITHUB_TOKEN }}
checkName: Unit tests
ref: ${{ github.event.pull_request.head.sha || github.sha }}
- name: merge
if: steps.wait-for-unit-tests.outputs.conclusion == 'success'
uses: ridedott/merge-me-action@v1.8.47
with:
GITHUB_LOGIN: dependabot[bot]
GITHUB_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
MERGE_METHOD: REBASE
PRESET: DEPENDABOT_PATCH
First I check to make sure the PR is opened by dependabot, if not then it skips the action. Next I wait for the Unit tests job to pass. If that's successful, then I use the merge action to merge any patch updates through.
I made some changes to the automerging workflow for repositories that rely on unit tests.
First I check to make sure the PR is opened by dependabot, if not then it skips the action. Next I wait for the
Unit testsjob to pass. If that's successful, then I use the merge action to merge any patch updates through.