Skip to content

Merge branch 'main' of https://github.com/ceilf6/Lab #4

Merge branch 'main' of https://github.com/ceilf6/Lab

Merge branch 'main' of https://github.com/ceilf6/Lab #4

Workflow file for this run

name: Auto Update README
on:
push:
branches:
- main
# 添加写权限
permissions:
contents: write
jobs:
update-readme:
# 只有 commit message 包含 [ptr] 时才执行
if: contains(github.event.head_commit.message, '[ptr]')
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
token: ${{ secrets.GITHUB_TOKEN }}
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '18'
- name: Update README
env:
COMMIT_MESSAGE: ${{ github.event.head_commit.message }}
COMMIT_SHA: ${{ github.sha }}
REPO_URL: ${{ github.server_url }}/${{ github.repository }}
run: node scripts/update-readme.js
- name: Commit changes
uses: stefanzweifel/git-auto-commit-action@v4
with:
commit_message: "docs: auto update README [skip ci]"
file_pattern: README.md