31 lines
956 B
YAML
31 lines
956 B
YAML
on:
|
|
push:
|
|
paths:
|
|
- 'docs/src/README_template.md'
|
|
permissions:
|
|
contents: write
|
|
jobs:
|
|
update-readme:
|
|
runs-on: ubuntu-latest
|
|
defaults:
|
|
run:
|
|
working-directory: ./
|
|
steps:
|
|
- name: Check out the repository to the runner
|
|
uses: actions/checkout@v4
|
|
- name: Install required dependencies
|
|
run: |
|
|
wget https://go.dev/dl/go1.23.2.linux-amd64.tar.gz
|
|
rm -rf /usr/local/go && tar -C /usr/local -xzf go1.23.2.linux-amd64.tar.gz
|
|
export PATH=$PATH:/usr/local/go/bin
|
|
go install github.com/anotherhadi/markdown-table-of-contents@latest
|
|
- name: Run a script
|
|
run: |
|
|
chmod +x ./docs/scripts/create_readme.sh
|
|
./docs/scripts/create_readme.sh
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
git add .
|
|
git commit -m "Update README.md (auto)"
|
|
git push
|