Skip to content

fix(gha)(deps): bump the github-actions group across 1 directory with 9 updates #21

fix(gha)(deps): bump the github-actions group across 1 directory with 9 updates

fix(gha)(deps): bump the github-actions group across 1 directory with 9 updates #21

---
# SPDX-FileCopyrightText: GitHub, Inc. and contributors
# SPDX-License-Identifier: MIT
name: "Dependabot auto-merge"
on: pull_request # yamllint disable-line rule:truthy
permissions:
contents: read
jobs:
dependabot:
if: ${{ github.actor == 'dependabot[bot]' }}
runs-on: ubuntu-latest
permissions:
pull-requests: write
issues: write
repository-projects: write
steps:
- name: "Dependabot metadata"
id: metadata
uses: dependabot/fetch-metadata@dbb049abf0d677abbd7f7eee0375145b417fdd34 # v2.2.0
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: "Add a label for all production dependencies"
if: ${{ steps.metadata.outputs.dependency-type == 'direct:production' }}
run: gh pr edit "$PR_URL" --add-label "production"
env:
PR_URL: ${{github.event.pull_request.html_url}}
- name: "Approve a PR"
run: gh pr review --approve "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: "Enable auto-merge for Dependabot PRs"
if: ${{contains(steps.metadata.outputs.dependency-names, 'my-dependency') &&
steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}