Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: annotate errors on CI #113

Merged
merged 1 commit into from
Jan 11, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions .github/workflows/tidy_up_repository.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ set -o errexit -o nounset -o pipefail

# First verify if the repository is clean.
if ! git diff --exit-code; then
>&2 echo "ERROR: The repository is not clean - please verify the changes and fix them."
error_msg="ERROR: The repository is not clean - please verify the changes and fix them."
echo "::error ::${error_msg}"
exit 1
fi

Expand All @@ -20,7 +21,8 @@ commands=(
for cmd in "${commands[@]}"; do
/bin/bash -c "${cmd}"
if ! git diff --exit-code; then
>&2 echo "ERROR: Please run '${cmd}' and commit the changes."
error_msg="ERROR: Please run '${cmd}' and commit the changes."
echo "::error ::${error_msg}"
exit 1
fi
done