Merge pull request #411 from m-tartari/chore/ci/dependabot_automation

👷 chore(CI): Automate Dependabot workflow
This commit is contained in:
2025-03-18 14:32:20 +01:00
committed by GitHub
3 changed files with 32 additions and 2 deletions
-1
View File
@@ -7,7 +7,6 @@ updates:
timezone: 'Europe/Rome' timezone: 'Europe/Rome'
interval: 'daily' interval: 'daily'
open-pull-requests-limit: 10 open-pull-requests-limit: 10
rebase-strategy: 'disabled' # Disable rebasing for npm pull requests
commit-message: commit-message:
prefix: '⬆️ chore' prefix: '⬆️ chore'
include: 'scope' include: 'scope'
+1 -1
View File
@@ -29,7 +29,7 @@ jobs:
run: npm run test:coverage run: npm run test:coverage
- name: Upload coverage reports to Codecov - name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4.0.1 uses: codecov/codecov-action@v4
with: with:
token: ${{ secrets.CODECOV_TOKEN }} token: ${{ secrets.CODECOV_TOKEN }}
slug: m-tartari/m-tartari.github.io slug: m-tartari/m-tartari.github.io
@@ -0,0 +1,31 @@
name: Dependabot Automation
on: pull_request
permissions:
pull-requests: write
contents: write
jobs:
dependabot:
runs-on: ubuntu-latest
if: github.event.pull_request.user.login == 'dependabot[bot]' && github.repository == 'm-tartari/m-tartari.github.io'
steps:
- name: Dependabot metadata
id: metadata
uses: dependabot/fetch-metadata@v2
with:
github-token: '${{ secrets.GITHUB_TOKEN }}'
- name: Approve a PR
run: gh pr review --approve "$PR_URL"
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}
- name: Enable auto-merge for Dependabot PRs
if: steps.metadata.outputs.update-type == 'version-update:semver-patch' || steps.metadata.outputs.update-type == 'version-update:semver-minor'
run: gh pr merge --auto --squash "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GH_TOKEN: ${{secrets.GITHUB_TOKEN}}