From aac3d8fad0423c24ab3b55c81dcd7294c15aa2a2 Mon Sep 17 00:00:00 2001 From: Ethan Dickinson Date: Fri, 21 Jun 2024 13:32:09 -0400 Subject: [PATCH] automatic updates --- .github/dependabot.yml | 11 +++++++++++ .github/workflows/auto-approve.yml | 21 +++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 .github/dependabot.yml create mode 100644 .github/workflows/auto-approve.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..8df867c --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,11 @@ +# 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: "pip" + directory: "/backend/requirements.txt" # Location of package manifests + schedule: + interval: "daily" diff --git a/.github/workflows/auto-approve.yml b/.github/workflows/auto-approve.yml new file mode 100644 index 0000000..e56b95a --- /dev/null +++ b/.github/workflows/auto-approve.yml @@ -0,0 +1,21 @@ +name: Auto approve and merge dependency bump PRs + +on: pull_request + +permissions: + contents: write + pull-requests: write + +jobs: + auto-approve: + runs-on: ubuntu-latest + if: github.event.pull_request.user.login == 'dependabot[bot]' + steps: + - run: gh pr review --approve "$PR_URL" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} + - run: gh pr merge --auto --squash "$PR_URL" + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + PR_URL: ${{ github.event.pull_request.html_url }} \ No newline at end of file