2021-06-09 15:15:29 +00:00
|
|
|
name: Format README.md
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
sync-assets:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-10-04 13:32:13 +00:00
|
|
|
- uses: actions/checkout@v3.1.0
|
2021-06-09 15:15:29 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
|
|
|
|
2022-10-29 21:48:36 +00:00
|
|
|
- name: Run auto-doc
|
2022-10-30 02:26:39 +00:00
|
|
|
uses: tj-actions/auto-doc@v1.4.3
|
2022-10-29 21:48:36 +00:00
|
|
|
|
2021-06-09 15:15:29 +00:00
|
|
|
- name: Run test
|
2022-03-21 01:26:21 +00:00
|
|
|
uses: tj-actions/remark@v3
|
2021-06-09 15:15:29 +00:00
|
|
|
|
|
|
|
- name: Verify Changed files
|
2022-10-16 06:48:10 +00:00
|
|
|
uses: tj-actions/verify-changed-files@v12
|
2021-06-09 15:15:29 +00:00
|
|
|
id: verify_changed_files
|
|
|
|
with:
|
|
|
|
files: |
|
|
|
|
README.md
|
2021-09-04 13:31:19 +00:00
|
|
|
|
2021-06-09 15:15:29 +00:00
|
|
|
- name: README.md changed
|
|
|
|
if: steps.verify_changed_files.outputs.files_changed == 'true'
|
|
|
|
run: |
|
2022-11-01 21:33:17 +00:00
|
|
|
echo "README.md has uncommitted changes"
|
2021-06-09 15:15:29 +00:00
|
|
|
exit 1
|
2021-09-04 13:31:19 +00:00
|
|
|
|
2021-06-09 15:15:29 +00:00
|
|
|
- name: Create Pull Request
|
|
|
|
if: failure()
|
2022-10-18 06:18:08 +00:00
|
|
|
uses: peter-evans/create-pull-request@v4.2.0
|
2021-06-09 15:15:29 +00:00
|
|
|
with:
|
|
|
|
base: "main"
|
|
|
|
title: "Updated README.md"
|
|
|
|
branch: "chore/update-readme"
|
|
|
|
commit-message: "Updated README.md"
|
|
|
|
body: "Updated README.md"
|
|
|
|
token: ${{ secrets.PAT_TOKEN }}
|