Skip to content

Commit

Permalink
test: Add some automated workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
skyzyx committed Nov 11, 2024
1 parent 7d5ba07 commit 5c2dc94
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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}"

0 comments on commit 5c2dc94

Please sign in to comment.