ci: rename workflow file #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Awesome_Lint | |
on: | |
workflow_dispatch: | |
pull_request: | |
branches: | |
- main | |
- master | |
push: | |
branches: | |
- main | |
- master | |
jobs: | |
toc: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Generate TOC | |
run: | | |
npm install -g doctoc | |
doctoc README.md | |
- name: Commit changes | |
run: | | |
git config --global user.name "github-actions" | |
git config --global user.email "github-actions@github.com" | |
git add README.md | |
git commit -m "Auto update TOC" || exit 0 | |
git push | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
Awesome_Lint: | |
runs-on: ubuntu-latest | |
needs: toc | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
fetch-depth: 0 | |
- run: npx awesome-lint |