Skip to content

chore: dependencies and refactor ci #229

chore: dependencies and refactor ci

chore: dependencies and refactor ci #229

Workflow file for this run

name: Dependabot auto approve
on: pull_request
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: ${{ github.actor == 'dependabot[bot]' }}
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@4de7a6c08ce727a42e0adbbdc345f761a01240ce # v1.3.6
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
- name: Checkout
uses: actions/checkout@b56e6a3d768b11aef1d4c73977caf6413c0d74c8
- 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 Dependabot PRs for dev dependencies patch / minor
if: ${{ contains(steps.metadata.outputs.dependency-type, ':development') && steps.metadata.outputs.update-type != 'version-update:semver-major' }}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{ github.event.pull_request.html_url }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Enable auto-merge Dependabot PRs for production dependencies minor
if: ${{ contains(steps.metadata.outputs.dependency-type, ':production') && 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 }}