diff --git a/.github/workflows/dependabot-auto-merge.yml b/.github/workflows/dependabot-auto-merge.yml new file mode 100644 index 0000000..e278e1e --- /dev/null +++ b/.github/workflows/dependabot-auto-merge.yml @@ -0,0 +1,36 @@ +--- +name: Auto-merge Dependabot Pull Requests +on: pull_request_target + +permissions: + contents: write + issues: write + pull-requests: write + repository-projects: write + +jobs: + dependabot: + runs-on: ubuntu-latest + if: ${{ github.actor == 'dependabot[bot]' }} + steps: + - name: Dependabot metadata + id: metadata + uses: dependabot/fetch-metadata@v2.2.0 + with: + github-token: "${{ secrets.GITHUB_TOKEN }}" + + - name: Auto-merge Dependabot PRs for semver-minor updates + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-minor'}} + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + gh pr merge --auto --squash "${PR_URL}" + + - name: Auto-merge Dependabot PRs for semver-patch updates + if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}} + env: + PR_URL: ${{github.event.pull_request.html_url}} + GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} + run: | + gh pr merge --auto --squash "${PR_URL}" diff --git a/.github/workflows/markdownlint.yml b/.github/workflows/markdownlint.yml index 2fe412c..f01894d 100644 --- a/.github/workflows/markdownlint.yml +++ b/.github/workflows/markdownlint.yml @@ -50,7 +50,7 @@ jobs: - name: Run Markdownlint run: | npm exec -y -- \ - markdownlint-cli@0.39.0 \ + markdownlint-cli@0.40.0 \ --ignore=node_modules \ --ignore=.github \ --ignore=.templates \