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 9909705 commit a0634a0
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 1 deletion.
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}"
2 changes: 1 addition & 1 deletion .github/workflows/markdownlint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 \
Expand Down

0 comments on commit a0634a0

Please sign in to comment.