ci/validate-pr: Use ::error:: command to print errors

This will make Github render the log line as an error.

Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
(cherry picked from commit fb92caf2aa)
Signed-off-by: Paweł Gronowski <pawel.gronowski@docker.com>
This commit is contained in:
Paweł Gronowski 2024-04-05 12:06:08 +02:00
parent f3842ab533
commit dea47c0810
No known key found for this signature in database
GPG key ID: B85EFCFE26DEF92A

View file

@ -11,7 +11,7 @@ jobs:
- name: Missing `area/` label
if: contains(join(github.event.pull_request.labels.*.name, ','), 'impact/') && !contains(join(github.event.pull_request.labels.*.name, ','), 'area/')
run: |
echo "Every PR with an \`impact/*\` label should also have an \`area/*\` label"
echo "::error::Every PR with an 'impact/*' label should also have an 'area/*' label"
exit 1
- name: OK
run: exit 0
@ -32,13 +32,13 @@ jobs:
desc=$(echo "$block" | awk NF)
if [ -z "$desc" ]; then
echo "Changelog section is empty. Please provide a description for the changelog."
echo "::error::Changelog section is empty. Please provide a description for the changelog."
exit 1
fi
len=$(echo -n "$desc" | wc -c)
if [[ $len -le 6 ]]; then
echo "Description looks too short: $desc"
echo "::error::Description looks too short: $desc"
exit 1
fi