added permissions sections and alert-lookup variable to actions.yml

This commit is contained in:
skye rogers 2025-03-24 11:49:14 -07:00
parent 7bdd41ce23
commit 7e721b5822

View file

@ -7,12 +7,18 @@ permissions:
jobs:
dependabot:
permissions:
pull-requests: read
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'owner/my_repo'
steps:
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v2
with:
alert-lookup: true
compat-lookup: true
github-token: "${{ secrets.PAT_TOKEN }}"
- name: Enable auto-merge for Dependabot PRs
if: (steps.dependabot-metadata.outputs.cvss == true && update_types == 'minor' || 'patch')
run: gh pr merge --auto --merge "$PR_URL"