Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 7 additions & 30 deletions .github/workflows/dependabot-auto-merge.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,38 +10,9 @@ on:
- labeled

jobs:
dependabot-make-update:
# Only run on Dependabot PRs
if: github.event.pull_request.user.login == 'dependabot[bot]'
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Install Python 3.11
uses: actions/setup-python@v4
with:
python-version: '3.11'

- name: Install poetry
run: python -m pip install --upgrade pip setuptools wheel poetry

- name: Install project dependencies
run: make install-ci

- name: Update dependencies (make update)
run: make update

- name: Lint (make lint)
run: make lint

enable-automerge:
# Only run on Dependabot PRs after make update succeeds
# Only run on Dependabot PRs
if: github.event.pull_request.user.login == 'dependabot[bot]'
needs: dependabot-make-update
runs-on: ubuntu-latest
permissions:
contents: write
Expand All @@ -54,6 +25,12 @@ jobs:
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Auto-approve Dependabot PR
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
uses: hmarr/auto-approve-action@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}

- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch'
run: gh pr merge --auto --squash "$PR_URL"
Expand Down