From ad080165091d366421ebc7c32c8a0705401d0dd5 Mon Sep 17 00:00:00 2001 From: kuanyi-ng Date: Sun, 20 Feb 2022 00:08:10 +0900 Subject: [PATCH] create check-readme-in-sync workflow --- .github/workflows/check-readme-in-sync.yml | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/check-readme-in-sync.yml diff --git a/.github/workflows/check-readme-in-sync.yml b/.github/workflows/check-readme-in-sync.yml new file mode 100644 index 000000000..2106e0630 --- /dev/null +++ b/.github/workflows/check-readme-in-sync.yml @@ -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