From 35cefa0924e42566d3784e216d86298a5cfec460 Mon Sep 17 00:00:00 2001 From: Sam Yuan Date: Fri, 5 Jan 2024 23:06:08 +0800 Subject: [PATCH] CI add config to auto merge version bump up from dep bot Signed-off-by: Sam Yuan --- .github/workflows/depbot-auto.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/depbot-auto.yml diff --git a/.github/workflows/depbot-auto.yml b/.github/workflows/depbot-auto.yml new file mode 100644 index 0000000000..84220fc068 --- /dev/null +++ b/.github/workflows/depbot-auto.yml @@ -0,0 +1,23 @@ +name: Dependabot auto-merge +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Enable auto-merge for Dependabot PRs + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor' || steps.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}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} \ No newline at end of file