-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: check for changes to README and man page
Adds a check to CI on changes to either README.rst or git-secrets.1 that will fail if changes are made to one but not the other. Also update action/checkout to v4 Fixes: #243 Signed-off-by: ginglis13 <[email protected]>
- Loading branch information
Showing
2 changed files
with
35 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
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 | ||
|
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