From a65bc62a569b6d69599b73234ddc73f9cf52a144 Mon Sep 17 00:00:00 2001 From: Stavros Kois <47820033+stavros-k@users.noreply.github.com> Date: Sun, 31 Dec 2023 17:16:24 +0200 Subject: [PATCH] chore(script): say why it failed Signed-off-by: Stavros Kois <47820033+stavros-k@users.noreply.github.com> --- .github/workflows/charts-release.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.github/workflows/charts-release.yaml b/.github/workflows/charts-release.yaml index 918be6141ef..5b8b0c40efa 100644 --- a/.github/workflows/charts-release.yaml +++ b/.github/workflows/charts-release.yaml @@ -240,6 +240,14 @@ jobs: # Extract the file name and first line from each file filename=$(basename "${file}") echo "Found doc file: ${file}" + test_title=$(head -n 1 "${file}" | sed 's/# //') + if [-n ${test_title} ]; then + echo "Doc title should use front matter and not # for title, for example" + echo "---" + echo "title: ${test_title}" + echo "---" + exit 1 + fi title=$(cat "${file}" | grep "title: " | sed 's/title: //') echo "The title is: ${title}" # Create a markdown link using the file name and title