2022-02-20 00:08:10 +09: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-20 00:08:10 +09:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2022-03-17 17:55:50 +01:00
|
|
|
- gh-pages
|
2022-02-20 00:08:10 +09:00
|
|
|
|
2022-04-25 23:38:27 +00:00
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
2022-02-20 00:08:10 +09:00
|
|
|
jobs:
|
2023-07-02 10:14:35 +05:30
|
|
|
check-readme:
|
2022-02-20 00:08:10 +09:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout repository
|
2024-08-24 09:26:49 +00:00
|
|
|
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
|
2022-02-20 00:08:10 +09: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
|