From c3243a8cc3da6bafc9e363d3d09550e558cd529f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pawe=C5=82=20Gronowski?= Date: Fri, 19 Apr 2024 13:59:40 +0200 Subject: [PATCH] ci/validate-pr: Use `::error::` command to print errors MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This will make Github render the log line as an error. (copied from moby/moby fb92caf2aa6cf3664e11dc06ee10d114af300826) Signed-off-by: Paweł Gronowski --- .github/workflows/validate-pr.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/validate-pr.yml b/.github/workflows/validate-pr.yml index f7b43170d7..b39317005c 100644 --- a/.github/workflows/validate-pr.yml +++ b/.github/workflows/validate-pr.yml @@ -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