use printf to avoid commit messages containing `` from running commands on the actions runner
Some checks failed
Actions / Build Export Files (push) Successful in 7s
Actions / Autotagger (push) Failing after 9s
Actions / Build Documentation (push) Has been cancelled

This commit is contained in:
cswimr 2024-10-21 13:55:42 -04:00
parent 30f4c5eeb0
commit 9868104f1c
Signed by: cswimr
GPG key ID: A9C162E867C851FA

View file

@ -129,7 +129,8 @@ jobs:
id: check_commit_message id: check_commit_message
run: | run: |
COMMIT_MESSAGE="${{ steps.extract_commit_message.outputs.message }}" COMMIT_MESSAGE="${{ steps.extract_commit_message.outputs.message }}"
OUTPUT="$(python .gitea/workflows/scripts/message.py "$COMMIT_MESSAGE")" ESCAPED_COMMIT_MESSAGE="$(printf '%q' "$COMMIT_MESSAGE")"
OUTPUT="$(python .forgejo/workflows/scripts/message.py '$ESCAPED_COMMIT_MESSAGE')"
if [ "$OUTPUT" = "Usage: python message.py <commit_message>" ]; then if [ "$OUTPUT" = "Usage: python message.py <commit_message>" ]; then
echo "Called without commit message!" echo "Called without commit message!"
exit 1 exit 1