Skip to content

build(deps): bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 #16

build(deps): bump dependabot/fetch-metadata from 1.6.0 to 2.1.0

build(deps): bump dependabot/fetch-metadata from 1.6.0 to 2.1.0 #16

name: Dependabot Pull Request Approve and Merge
on: [pull_request_target]
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
name: Dependabot Pull Request Approve and Merge
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Retrieve Dependabot Pull Request Metadata
id: dependabot-metadata
uses: dependabot/[email protected]
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve Dependabot Pull Request
run: |
gh pr review --approve "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable Auto Merge Dependabot Pull Request
if: ${{ steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_URL: ${{ github.event.pull_request.html_url }}
run: |
gh pr merge --auto --rebase "$PR_URL"