2022-02-19 16:08:10 +01:00
|
|
|
# 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:
|
2022-03-17 17:55:50 +01:00
|
|
|
- gh-pages
|
2022-02-19 16:08:10 +01:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-03-17 17:55:50 +01:00
|
|
|
- gh-pages
|
2022-02-19 16:08:10 +01:00
|
|
|
|
2022-04-26 01:38:27 +02:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-02-19 16:08:10 +01:00
|
|
|
jobs:
|
|
|
|
check:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2022-03-07 19:18:05 +01:00
|
|
|
uses: actions/checkout@v3
|
2022-02-19 16:08:10 +01:00
|
|
|
|
|
|
|
- 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
|