From 57f5539601c19a6ebba58126bbb8ddd56b05ceb7 Mon Sep 17 00:00:00 2001 From: Marco Pivetta Date: Tue, 22 Mar 2022 12:54:19 +0100 Subject: [PATCH] Introduced automation to auto-merge @dependabot patches, if they are green In practice, when @dependabot sends a patch, this workflow will be triggered once the `build` workflow is completed successfully, and applicable patches will be automatically merged. --- .../workflows/merge-dependabot-upgrades.yml | 23 +++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/merge-dependabot-upgrades.yml diff --git a/.github/workflows/merge-dependabot-upgrades.yml b/.github/workflows/merge-dependabot-upgrades.yml new file mode 100644 index 0000000..8c7b4b9 --- /dev/null +++ b/.github/workflows/merge-dependabot-upgrades.yml @@ -0,0 +1,23 @@ +# See https://github.com/ridedott/merge-me-action/ +# This workflow automates merges from patches sent by Dependabot, and +# only by dependabot, once the other CI workflows pass +name: Auto-merge Dependabot PRs + +on: + workflow_run: + types: + - completed + workflows: + - "build" + +jobs: + merge-me: + name: Auto-merge Dependabot PRs + runs-on: ubuntu-latest + steps: + - name: Auto-Merge + if: ${{ github.event.workflow_run.conclusion == 'success' }} + uses: ridedott/merge-me-action@v2 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + MERGE_METHOD: MERGE