From 4140fb18c09c6d99eaa05cd72732c774048d0959 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=BE=90=E6=99=93=E4=BC=9F?= Date: Tue, 23 May 2023 09:51:24 +0800 Subject: [PATCH] =?UTF-8?q?:construction=5Fworker:=20=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E5=8D=87=E7=BA=A7=E5=AE=8C=E6=88=90=E5=90=8E=EF=BC=8C=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E5=90=88=E5=B9=B6PR=20dependabot=20=E4=BE=9D=E8=B5=96?= =?UTF-8?q?=E6=9C=BA=E5=99=A8=E4=BA=BA=E5=AF=B9=E4=BE=9D=E8=B5=96=E5=8D=87?= =?UTF-8?q?=E7=BA=A7=E5=AE=8C=E6=88=90=E5=90=8E=EF=BC=8C=E8=87=AA=E5=8A=A8?= =?UTF-8?q?=E5=90=88=E5=B9=B6PR?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .github/workflows/maven.yml | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index 79b631a0..799e174c 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -44,3 +44,45 @@ jobs: # 💤🤷‍♀️ failure 🙅‍♂️💣 [pig-mesh/pig](https://github.com/pig-mesh/pig) > Github Action: https://github.com/pig-mesh/pig failure > (⋟﹏⋞) from github action message + + + # 依赖升级完成后,自动合并PR + # https://docs.github.com/zh/enterprise-cloud@latest/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions + dependabot: + name: Dependabot + # 需要所有 build 完成后,才运行 + needs: build + runs-on: ${{ matrix.os }} + permissions: + # 可以修改仓库中的文件内容 + contents: write + # # 可以新建或修改 Pull Request + pull-requests: write + # 依赖机器人 && 仅PR + if: ${{ github.actor == 'dependabot[bot]' && github.event_name == 'pull_request' }} + + strategy: + matrix: + os: [ "ubuntu-latest" ] + + steps: + + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: echo + run: | + echo ${{ github.event.pull_request.html_url }} + echo ${{ steps.metadata.outputs.dependency-names }} + echo ${{ steps.metadata.outputs.update-type }} + echo ${{ 'version-update:semver-patch' }} + + - name: Enable auto-merge for Dependabot PRs + # if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') && 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 }} -- Gitee