From 77cd2e13c797e755cb43bf8f246229f1e79b431b Mon Sep 17 00:00:00 2001 From: Hassan Kibirige Date: Wed, 24 Apr 2024 19:55:46 +0300 Subject: [PATCH] CI: Deal with ' in commit title --- .github/workflows/documentation.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 55eafea17..0df55be03 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -27,7 +27,12 @@ jobs: set -xe CAN_DEPLOY=$(python ../utils/please.py can_i_deploy_documentation) DEPLOY_TO=$(python ../utils/please.py where_can_i_deploy_documentation) - TITLE=$(echo '${{ github.event.head_commit.message }}' | head -n 1) + # The message string is directly substituted in before the command is run. + # We use a HereDoc to avoid quotation issues if the message has quotes as well. + TITLE=$(cat <> $GITHUB_OUTPUT echo "deploy_to=$DEPLOY_TO" >> $GITHUB_OUTPUT