diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 000000000000..3ab6783bdb61 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,15 @@ +# To get started with Dependabot version updates, you'll need to specify which +# package ecosystems to update and where the package manifests are located. +# Please see the documentation for all configuration options: +# https://docs.github.com/github/administering-a-repository/configuration-options-for-dependency-updates + +version: 2 +updates: + - package-ecosystem: "gitsubmodule" + directory: "/" + allow: + - dependency-name: "externals/llvm-project" + schedule: + interval: "daily" + time: "06:00" + timezone: "Europe/Berlin" diff --git a/.github/workflows/approve_dependabot.yml b/.github/workflows/approve_dependabot.yml new file mode 100644 index 000000000000..05d8b0f2e72d --- /dev/null +++ b/.github/workflows/approve_dependabot.yml @@ -0,0 +1,26 @@ +name: Dependabot auto-approve & auto-merge +on: pull_request + +permissions: + pull-requests: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + - name: Approve a PR + run: gh pr review --approve "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}} + - name: Enable auto-merge for Dependabot PRs + run: gh pr merge --auto --merge "$PR_URL" + env: + PR_URL: ${{github.event.pull_request.html_url}} + GH_TOKEN: ${{secrets.GITHUB_TOKEN}}