Skip to content

update workflow

update workflow #25

Workflow file for this run

name: Bot Auto-Approve and Merge
on: pull_request
permissions:
contents: write
pull-requests: write
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
jobs:
merge_pr:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' || github.actor == 'github-action[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Auto-approve bot PR
run: gh pr review --approve "$PR_URL"
- name: Auto-merge bot PRs
run: gh pr merge --auto --merge "$PR_URL"