Skip to content

Commit 3a0d21e

Browse files
committed
Support multi-line
{craft} extensions: curl,ast sapi: cli,micro {/craft}
1 parent 45ec0ce commit 3a0d21e

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

.github/workflows/commit-tests.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -32,25 +32,29 @@ jobs:
3232
echo "skip_craft=yes" >> $GITHUB_OUTPUT
3333
exit 0
3434
else
35-
echo "\e[32mCraft tags found in commit message.\e[0m"
35+
echo -e "\e[32mCraft tags found in commit message.\e[0m"
3636
# get the craft content
3737
CRAFT_CONTENT=$(echo "$COMMIT_MESSAGE" | sed -nz 's/.*{craft}\(.*\){\/craft}.*/\1/p')
3838
echo "Craft content: $CRAFT_CONTENT"
3939
# set the output variable
40-
echo "craft=$CRAFT_CONTENT" >> $GITHUB_OUTPUT
40+
echo "craft<<EOF" >> $GITHUB_OUTPUT
41+
echo "$CRAFT_CONTENT" >> $GITHUB_OUTPUT
42+
echo "EOF" >> $GITHUB_OUTPUT
4143
fi
4244
4345
# parse the bash test script from the commit message
4446
if [[ "$COMMIT_MESSAGE" != *"{bash}"* ]] || [[ "$COMMIT_MESSAGE" != *"{/bash}"* ]]; then
4547
echo "No {bash} tags found in commit message. Skipping bash test."
4648
echo "skip_bash=yes" >> $GITHUB_OUTPUT
4749
else
48-
echo "\e[32mBash tags found in commit message.\e[0m"
50+
echo -e "\e[32mBash tags found in commit message.\e[0m"
4951
# get the bash content
5052
BASH_CONTENT=$(echo "$COMMIT_MESSAGE" | sed -nz 's/.*{bash}\(.*\){\/bash}.*/\1/p')
5153
echo "Bash content: $BASH_CONTENT"
5254
# set the output variable
53-
echo "bash=$BASH_CONTENT" >> $GITHUB_OUTPUT
55+
echo "bash<<EOF" >> $GITHUB_OUTPUT
56+
echo "$BASH_CONTENT" >> $GITHUB_OUTPUT
57+
echo "EOF" >> $GITHUB_OUTPUT
5458
fi
5559
5660
# parse spc_prefix from commit message, e.g. [spc_prefix:bin/spc-gnu-docker], default: bin/spc

0 commit comments

Comments
 (0)