Files
HetznerDokployLab/.github/workflows/dependabotautomerge.yml

28 lines
660 B
YAML

name: Auto-merge Dependabot PRs
on:
pull_request:
types: [opened, synchronize, reopened]
permissions:
contents: write
pull-requests: write
jobs:
automerge:
if: github.actor == 'dependabot[bot]'
runs-on: ubuntu-latest
steps:
- name: Check for auto-merge label
id: check
run: |
labels=$(jq -r '.pull_request.labels[].name' "$GITHUB_EVENT_PATH")
echo "labels=$labels" >> $GITHUB_OUTPUT
- name: Auto-merge
if: contains(steps.check.outputs.labels, 'auto-merge')
uses: fastify/github-action-merge-dependabot@v3
with:
github-token: ${{ secrets.GH_TOKEN }}