ci: check for changes to README and man page #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | ||
name: "Sync README and man page" | ||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'README.rst' | ||
- 'git-secrets.1' | ||
pull_request: | ||
branches: | ||
- 'master' | ||
paths: | ||
- 'README.rst' | ||
- 'git-secrets.1' | ||
jobs: | ||
sync-readme-man-page: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- run: | | ||
README_CHANGED=$(git diff --exit-code README.rst &>/dev/null; echo $?) | ||
MANPAGE_CHANGED=$(git diff --exit-code git-secrets.1 &>/dev/null; echo $?) | ||
if [[ $README_CHANGE == $MANPAGE_CHANGED ]]; then | ||
echo "README and man page in sync." | ||
exit 0 | ||
else | ||
echo "README and man page not in sync. Run `make man` to resolve." | ||
exit 1 | ||
fi | ||