2021-05-27 20:20:59 +08:00
|
|
|
name: Format README.md
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync-assets:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-12-13 06:24:50 +08:00
|
|
|
- uses: actions/checkout@v3.2.0
|
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-01-04 07:43:28 +08:00
|
|
|
uses: tj-actions/auto-doc@v1.7.3
|
2021-05-27 20:20:59 +08:00
|
|
|
|
|
|
|
- name: Run test
|
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
|
2022-12-16 05:28:44 +08:00
|
|
|
uses: tj-actions/verify-changed-files@v13
|
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()
|
2022-12-31 12:52:25 +08:00
|
|
|
uses: peter-evans/create-pull-request@v4.2.3
|
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 }}
|