Merge pull request #29 from MohamedElashri/linter2main
Add linter to the generate_readme action
This commit is contained in:
commit
1e9a6e0406
|
|
@ -1,20 +1,28 @@
|
||||||
name: Update README
|
name: Update README
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
- main
|
- main
|
||||||
paths:
|
paths:
|
||||||
- '_README.md'
|
- '_README.md'
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
update-readme:
|
update-readme:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout repository
|
- name: Checkout repository
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Generate README.md
|
- name: Generate README.md
|
||||||
run: |
|
run: |
|
||||||
python3 generate_readme.py _README.md > README.md
|
python3 generate_readme.py _README.md > README.md
|
||||||
|
|
||||||
|
- name: Lint README.md
|
||||||
|
run: npx awesome-lint README.md
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
|
if: success() # Only commit if linting passes
|
||||||
uses: stefanzweifel/git-auto-commit-action@v4
|
uses: stefanzweifel/git-auto-commit-action@v4
|
||||||
with:
|
with:
|
||||||
commit_message: 'Auto-update README.md [skip ci]'
|
commit_message: 'Auto-update README.md [skip ci]'
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue