Skip to content

[github actions] Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0 #6

[github actions] Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0

[github actions] Bump dependabot/fetch-metadata from 1.6.0 to 2.0.0 #6

# reference:
# https://docs.github.com/en/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#enable-auto-merge-on-a-pull-request
name: Dependabot auto-merge
on:
pull_request:
types: ['opened', 'reopened', 'ready_for_review', 'synchronize']
permissions:
contents: write
pull-requests: write
jobs:
dependabot-auto-merge:
runs-on: ubuntu-latest
# only runs if PR is opened by "dependabot[bot]"
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/[email protected]
with:
github-token: '${{ secrets.HUME_BOT_TOKEN }}'
- name: Approve a PR
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.HUME_BOT_TOKEN}}
run: gh pr review --approve "$PR_URL"
- name: Enable auto-merge for Dependabot PRs
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.HUME_BOT_TOKEN}}
run: gh pr merge --auto --squash "$PR_URL"