diff --git a/.gitea/workflows/actions.yaml b/.gitea/workflows/actions.yaml index 78189ab..fc7e27a 100644 --- a/.gitea/workflows/actions.yaml +++ b/.gitea/workflows/actions.yaml @@ -127,9 +127,11 @@ jobs: - name: Check commit message id: check_commit_message + shell: bash run: | COMMIT_MESSAGE="${{ steps.extract_commit_message.outputs.message }}" - OUTPUT="$(python .forgejo/workflows/scripts/message.py '$COMMIT_MESSAGE')" + ESCAPED_COMMIT_MESSAGE="$(printf '%s\n' "$COMMIT_MESSAGE" | sed -e 's/['"'"'\\&]/\\&/g')" + OUTPUT="$(python .forgejo/workflows/scripts/message.py '$ESCAPED_COMMIT_MESSAGE')" if [ "$OUTPUT" = "Usage: python message.py " ]; then echo "Called without commit message!" exit 1