From 28a36d13d18b48b33efb214daf494cfd305dfe2b Mon Sep 17 00:00:00 2001 From: Vasiliy Vasilyuk Date: Tue, 31 Dec 2024 10:24:24 +0300 Subject: [PATCH] Add auto-merge for Dependabot PRs This will make it easier to maintain the repository. Since this is a demo project, it is enough to pass CI to update the dependency. Do not mindlessly copy this approach to projects on which other projects depend. --- .github/workflows/dependabot-auto-merge.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 .github/workflows/dependabot-auto-merge.yml diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..646fcb0 --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,16 @@ +--- +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + +jobs: + auto-merge: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "${{ github.event.pull_request.html_url }}" + env: + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}