From 492b528ab026b9913b7fc7f1a0a22fbac699ff7f Mon Sep 17 00:00:00 2001 From: viral32111 <19510403+viral32111@users.noreply.github.com> Date: Fri, 20 Oct 2023 21:29:29 +0100 Subject: [PATCH] Setup Dependabot auto-merge workflow --- .github/workflows/automerge.yml | 34 +++++++++++++++++++++++++++++++++ .github/workflows/ci.yml | 2 +- .github/workflows/codeql.yml | 4 ++-- 3 files changed, 37 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/automerge.yml diff --git a/.github/workflows/automerge.yml b/.github/workflows/automerge.yml new file mode 100644 index 0000000..39ccdd8 --- /dev/null +++ b/.github/workflows/automerge.yml @@ -0,0 +1,34 @@ +name: Dependabot Auto-Merge + +on: + pull_request: + types: + - opened + - synchronize + - reopened + - ready_for_review + workflow_dispatch: + +jobs: + dependabot-auto-merge: + name: Dependabot Auto-Merge + runs-on: ubuntu-latest + if: github.actor == 'dependabot[bot]' + permissions: + contents: write + pull-requests: write + issues: write + steps: + - name: Clone repository + uses: actions/checkout@v3 + + - name: Fetch Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v1 + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + + - name: Enable auto-merge for pull request + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + run: gh pr merge --auto --rebase ${{ github.event.pull_request.html_url }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 096e312..6a8b2b7 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,7 +8,7 @@ on: - 'TwitchBot.sln' - 'Dockerfile' - '.dockerignore' - - '.github/workflows/ci.yml' + - '.github/workflows/*.yml' branches: - '**' tags: diff --git a/.github/workflows/codeql.yml b/.github/workflows/codeql.yml index 6a06be9..77478d8 100644 --- a/.github/workflows/codeql.yml +++ b/.github/workflows/codeql.yml @@ -3,9 +3,9 @@ name: CodeQL on: push: paths: - - '**' + - '**' branches: - - '**' + - '**' schedule: - cron: '0 0 * * 0'