From 95d1285a091f57e6bcd6a3ca94c712934d12094c Mon Sep 17 00:00:00 2001 From: SteveLauC Date: Sat, 13 Apr 2024 19:22:46 +0800 Subject: [PATCH] ci: fix changelog checker by trimming the 'changelog/' prefix (#2368) --- .github/actions/check_new_changelog/action.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.github/actions/check_new_changelog/action.yml b/.github/actions/check_new_changelog/action.yml index a145021468..c366654aae 100644 --- a/.github/actions/check_new_changelog/action.yml +++ b/.github/actions/check_new_changelog/action.yml @@ -18,7 +18,11 @@ runs: NEW_CHANGELOGS: ${{ steps.new-changelogs.outputs.added_files }} PR_NUMBER: ${{ github.event.number }} run: | + # `cl` will be something like "changelog/1.added.md" for cl in ${NEW_CHANGELOGS}; do + # Trim the directory name + prefix="changelog/"; trimmed_cl=${cl/#$prefix}; cl="${trimmed_cl}"; + # parse it IFS='.' read id kind file_extension <<< "${cl}"