Skip to content

Commit

Permalink
更新依赖配置与工作流
Browse files Browse the repository at this point in the history
  • Loading branch information
guanguans committed Apr 30, 2024
1 parent c3a1fee commit 4e9add5
Show file tree
Hide file tree
Showing 3 changed files with 50 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ updates:
schedule:
interval: daily
time: "21:00"
open-pull-requests-limit: 10
open-pull-requests-limit: 10
31 changes: 31 additions & 0 deletions .github/workflows/dependabot-auto-merge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: dependabot-auto-merge
on: pull_request_target

permissions:
pull-requests: write
contents: 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'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}

- name: Auto-merge Dependabot PRs for semver-patch updates
if: ${{steps.metadata.outputs.update-type == 'version-update:semver-patch'}}
run: gh pr merge --auto --merge "$PR_URL"
env:
PR_URL: ${{github.event.pull_request.html_url}}
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}}
24 changes: 18 additions & 6 deletions .github/workflows/lint-md.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,23 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: lint-md-github-action
uses: lint-md/[email protected]
- name: Set node version
uses: actions/setup-node@v4

- name: Install dependencies
run: npm install

- name: Lint markdown
run: npm run md-fix

- name: Lint zh_CN
run: npm run zh-fix

- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v5
with:
configFile: .lintmdrc
failOnWarnings: false
files: ./ ./.github/
commit_options: '--no-verify'
commit_message: Fix markdown
file_pattern: '*.md */*.md */*/*.md'

0 comments on commit 4e9add5

Please sign in to comment.