Skip to content

feat(workflow): add labels #2

feat(workflow): add labels

feat(workflow): add labels #2

name: Dependabot Auto-Merge
on:
pull_request_target:
workflow_call:
permissions:
contents: write
pull-requests: write
jobs:
auto_merge_dependabot:
name: Auto Merge Dependabot PRs
runs-on: ubuntu-latest
if: github.actor == 'dependabot[bot]'
steps:
- name: Fetch Dependabot Metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: Enable Auto-Merge for Dependabot PRs
if: |
startsWith(steps.metadata.outputs.update-type, 'version-update:semver-patch') ||
startsWith(steps.metadata.outputs.update-type, 'version-update:semver-minor')
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}