Skip to content

feat!: Add secrets input to workflow call #67

feat!: Add secrets input to workflow call

feat!: Add secrets input to workflow call #67

# https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/incorporating-changes-from-a-pull-request/automatically-merging-a-pull-request
name: Enable auto-merge on trivial Dependabot pull requests
on:
pull_request:
branches:
- main
paths:
- '.github/**'
- 'templates/**'
permissions:
contents: write
pull-requests: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
name: Enable auto-merge on trivial Dependabot pull requests
steps:
- name: Fetch Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@5e5f99653a5b510e8555840e80cbf1514ad4af38 # v2.1.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- if: ${{ contains(steps.metadata.outputs.dependency-names, 'actions/checkout') }}
name: Enable auto-merge on Dependabot PR if it's targeting actions/checkout
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: gh pr merge --auto --merge "$PR_URL"
# Enables auto-merge on PR with the merge commit merge method.
# This causes the PR to be merged when all the checks and approvals have passed.