github actions: experiment with workflow error commands

This commit is contained in:
Tero Marttila 2022-06-24 12:26:53 +03:00
parent b06e86edc2
commit c09c90d0a9
1 changed files with 5 additions and 1 deletions

View File

@ -6,6 +6,10 @@ fmt_list="$(gofmt -l "$@")"
if [ -n "$fmt_list" ]; then if [ -n "$fmt_list" ]; then
echo "Check gofmt failed: " >&2 echo "Check gofmt failed: " >&2
echo "${fmt_list}" | sed -e 's/^/\t/' >&2
for file in "$fmt_list"; do
echo "::error file=${file},title=gofmt::gofmt check failed"
echo "\t$file" >&2
done
exit 1 exit 1
fi fi