Merge pull request #411 from m-tartari/chore/ci/dependabot_automation
👷 chore(CI): Automate Dependabot workflow
This commit is contained in:
@@ -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'
|
||||||
|
|||||||
@@ -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}}
|
||||||
Reference in New Issue
Block a user