Skip to content

Commit

Permalink
CI: Deal with ' in commit title
Browse files Browse the repository at this point in the history
  • Loading branch information
has2k1 committed Apr 25, 2024
1 parent e76977b commit 77cd2e1
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion .github/workflows/documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 <<EOF | head -n 1
${{ github.event.head_commit.message }}
EOF
)
echo "can_deploy=$CAN_DEPLOY" >> $GITHUB_OUTPUT
echo "deploy_to=$DEPLOY_TO" >> $GITHUB_OUTPUT
Expand Down

0 comments on commit 77cd2e1

Please sign in to comment.