Skip to content

Commit

Permalink
ci: show warning when docs have uncommited changes
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Sep 18, 2024
1 parent e00d2f6 commit b6f6f05
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/generate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,20 @@ jobs:
add: docs/devenv.schema.json
message: 'Auto generate docs/devenv.schema.json'

- name: Check for uncommitted changes
run: |
diff=$(git diff --stat)
if [[ -n "$diff" ]]; then
message="There are uncommitted doc changes in the repository.
${diff}
You can:
a. Run the failing devenv-generate-* commands locally and commit the changes.
b. Let CI auto-commit the changes to your fork of the repo."
echo "::error::${message//$'\n'/%0A}"
exit 1
else
echo "No uncommitted doc changes found."
fi

0 comments on commit b6f6f05

Please sign in to comment.