-
-
Notifications
You must be signed in to change notification settings - Fork 0
27 lines (23 loc) · 814 Bytes
/
toc.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
---
name: Update TOC
on:
push:
branches: [main]
paths: ['README.md']
jobs:
build:
runs-on: ubuntu-latest
permissions:
# Give the default GITHUB_TOKEN write permission.
# https://github.blog/changelog/2023-02-02-github-actions-updating-the-default-github_token-permissions-to-read-only/
contents: write
timeout-minutes: 5
steps:
- uses: actions/checkout@v4.2.2
- run: |
curl https://raw.githubusercontent.com/ekalinin/github-markdown-toc/master/gh-md-toc -o gh-md-toc
chmod a+x gh-md-toc
./gh-md-toc --indent 2 --insert --no-backup --hide-footer README.md
- uses: stefanzweifel/git-auto-commit-action@v5.1.0
with:
commit_message: Auto update markdown TOC