2024-07-03 14:12:13 +00:00
|
|
|
# yaml-language-server: $schema=https://json.schemastore.org/github-workflow.json
|
|
|
|
# docs: https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions
|
|
|
|
|
|
|
|
name: 🤖 Dependabot
|
2023-09-02 13:46:02 +00:00
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request: {}
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: write
|
|
|
|
pull-requests: write
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
dependabot: # https://tinyurl.com/e69djmen
|
2024-07-03 14:12:13 +00:00
|
|
|
name: Enable auto-merge for Dependabot PRs
|
2023-09-02 13:46:02 +00:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
if: ${{ github.actor == 'dependabot[bot]' }}
|
|
|
|
steps:
|
2024-04-02 05:49:17 +00:00
|
|
|
- uses: dependabot/fetch-metadata@v2
|
2023-09-02 13:46:02 +00:00
|
|
|
id: metadata
|
|
|
|
with: {github-token: "${{ secrets.GITHUB_TOKEN }}"}
|
|
|
|
|
2024-07-03 14:12:13 +00:00
|
|
|
- if: ${{ contains(fromJSON('["version-update:semver-minor", "version-update:semver-patch"]'), steps.metadata.outputs.update-type) }}
|
2023-09-02 13:46:02 +00:00
|
|
|
run: gh pr merge --auto --merge "$PR_URL"
|
|
|
|
env:
|
|
|
|
PR_URL: ${{ github.event.pull_request.html_url }}
|
|
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|