From e2c1d8f5e1f55434af7ffa2c02f802d4544ee85e Mon Sep 17 00:00:00 2001 From: Kazuhiro NISHIYAMA Date: Thu, 19 Sep 2024 17:07:14 +0900 Subject: [PATCH] Add dependabot_automerge --- .github/workflows/dependabot_automerge.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 .github/workflows/dependabot_automerge.yml diff --git a/.github/workflows/dependabot_automerge.yml b/.github/workflows/dependabot_automerge.yml new file mode 100644 index 0000000000..0fc6ad5c7a --- /dev/null +++ b/.github/workflows/dependabot_automerge.yml @@ -0,0 +1,19 @@ +name: Dependabot auto-merge +on: pull_request_target +permissions: + pull-requests: write + contents: write +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: dependabot-metadata + uses: dependabot/fetch-metadata@v2 + - name: Enable auto-merge for Dependabot PRs + # if: ${{contains(steps.dependabot-metadata.outputs.dependency-names, 'rails') && steps.dependabot-metadata.outputs.update-type == 'version-update:semver-patch'}} + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}