2021-05-27 20:20:59 +08:00
|
|
|
name: Format README.md
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync-assets:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2024-05-09 07:19:47 +08:00
|
|
|
- uses: actions/checkout@44c2b7a8a4ea60a981eaca3cf939b5f4305c123b # v4
|
2021-05-27 20:20:59 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2022-12-31 12:52:25 +08:00
|
|
|
|
2022-03-23 05:16:13 +08:00
|
|
|
- name: Run auto-doc
|
2023-08-24 12:12:01 +08:00
|
|
|
uses: tj-actions/auto-doc@v3
|
2023-12-02 19:30:16 +08:00
|
|
|
with:
|
|
|
|
use_code_blocks: true
|
|
|
|
use_major_version: true
|
2021-05-27 20:20:59 +08:00
|
|
|
|
2023-01-06 12:21:03 +08:00
|
|
|
- name: Run remark
|
2022-03-18 20:12:05 +08:00
|
|
|
uses: tj-actions/remark@v3
|
2021-05-27 20:20:59 +08:00
|
|
|
|
|
|
|
- name: Verify Changed files
|
2024-05-05 02:00:59 +08:00
|
|
|
uses: tj-actions/verify-changed-files@v20
|
2021-05-27 20:20:59 +08:00
|
|
|
id: verify_changed_files
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
README.md
|
2022-12-31 12:52:25 +08:00
|
|
|
|
2021-05-27 20:20:59 +08:00
|
|
|
- name: README.md changed
|
|
|
|
if: steps.verify_changed_files.outputs.files_changed == 'true'
|
|
|
|
run: |
|
2022-12-31 12:52:25 +08:00
|
|
|
echo "README.md has uncommitted changes"
|
2021-05-27 20:20:59 +08:00
|
|
|
exit 1
|
2022-12-31 12:52:25 +08:00
|
|
|
|
2021-05-27 20:20:59 +08:00
|
|
|
- name: Create Pull Request
|
|
|
|
if: failure()
|
2024-01-31 20:13:40 +08:00
|
|
|
uses: peter-evans/create-pull-request@v6
|
2021-05-27 20:20:59 +08:00
|
|
|
with:
|
|
|
|
base: "main"
|
2022-12-31 12:52:25 +08:00
|
|
|
labels: "merge when passing"
|
2021-05-27 20:20:59 +08:00
|
|
|
title: "Updated README.md"
|
|
|
|
branch: "chore/update-readme"
|
|
|
|
commit-message: "Updated README.md"
|
|
|
|
body: "Updated README.md"
|
|
|
|
token: ${{ secrets.PAT_TOKEN }}
|