Skip to content

Bump the all-dependencies group with 5 updates #41

Bump the all-dependencies group with 5 updates

Bump the all-dependencies group with 5 updates #41

name: Dependabot auto-approve
on:
pull_request:
types:
- opened
- edited
- synchronize
permissions:
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@25dd0e34f4fe68f24cc83900b1fe3fe149efef98
with:
github-token: ${{secrets.DEPENDABOT_AUTO_APPROVE}}
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.DEPENDABOT_AUTO_APPROVE}}
- name: Check for major deps updates
if: steps.metadata.outputs.update-type == 'version-update:semver-major'
run: echo 'PR contains a Major dependency bump. ⚠️ It needs manual merge! ⚠️'
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-minor' || 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}}
GH_TOKEN: ${{secrets.DEPENDABOT_AUTO_APPROVE}}