Merge pull request #2755 from kuanyi-ng/feature/2456_check_readme_in_sync

Workflow: Check if `README.md` and `docs/README.md` are in sync
This commit is contained in:
Ashish Jain
2022-02-24 19:03:22 +01:00
committed by GitHub

View File

@@ -0,0 +1,34 @@
# Reference: https://github.com/Yash-Singh1/eslint-plugin-userscripts/blob/main/.github/workflows/readme-in-sync.yml
name: Check if README and docs/README are in sync
on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Check for difference in README.md and docs/README.md
run: |
if [ -z "$(diff README.md docs/README.md --brief)" ]
then
echo "README.md and docs/README.md are in sync"
else
echo "Make sure that README.md and docs/README.md are in sync"
echo
echo "Difference:"
echo
diff README.md docs/README.md -u
exit 1
fi