From 3a0d21eb44d2a9a79fd81fe44eec4d55f204f51c Mon Sep 17 00:00:00 2001 From: crazywhalecc Date: Sat, 14 Jun 2025 02:27:48 +0800 Subject: [PATCH] Support multi-line {craft} extensions: curl,ast sapi: cli,micro {/craft} --- .github/workflows/commit-tests.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/commit-tests.yml b/.github/workflows/commit-tests.yml index 45a5c391..8878fac1 100644 --- a/.github/workflows/commit-tests.yml +++ b/.github/workflows/commit-tests.yml @@ -32,12 +32,14 @@ jobs: echo "skip_craft=yes" >> $GITHUB_OUTPUT exit 0 else - echo "\e[32mCraft tags found in commit message.\e[0m" + echo -e "\e[32mCraft tags found in commit message.\e[0m" # get the craft content CRAFT_CONTENT=$(echo "$COMMIT_MESSAGE" | sed -nz 's/.*{craft}\(.*\){\/craft}.*/\1/p') echo "Craft content: $CRAFT_CONTENT" # set the output variable - echo "craft=$CRAFT_CONTENT" >> $GITHUB_OUTPUT + echo "craft<> $GITHUB_OUTPUT + echo "$CRAFT_CONTENT" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT fi # parse the bash test script from the commit message @@ -45,12 +47,14 @@ jobs: echo "No {bash} tags found in commit message. Skipping bash test." echo "skip_bash=yes" >> $GITHUB_OUTPUT else - echo "\e[32mBash tags found in commit message.\e[0m" + echo -e "\e[32mBash tags found in commit message.\e[0m" # get the bash content BASH_CONTENT=$(echo "$COMMIT_MESSAGE" | sed -nz 's/.*{bash}\(.*\){\/bash}.*/\1/p') echo "Bash content: $BASH_CONTENT" # set the output variable - echo "bash=$BASH_CONTENT" >> $GITHUB_OUTPUT + echo "bash<> $GITHUB_OUTPUT + echo "$BASH_CONTENT" >> $GITHUB_OUTPUT + echo "EOF" >> $GITHUB_OUTPUT fi # parse spc_prefix from commit message, e.g. [spc_prefix:bin/spc-gnu-docker], default: bin/spc