Skip to content

Commit

Permalink
Update build.yml to properly escape the commit message for JSON
Browse files Browse the repository at this point in the history
  • Loading branch information
onixiya1337 committed Jul 7, 2024
1 parent 0761d39 commit 5e4bf82
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
COMMIT=${{ toJSON(github.event.head_commit.message) }}
COMMIT_URL=${{ github.event.head_commit.url }}
SHORT_COMMIT_SHA=${{ steps.short_sha.outputs.sha_short }}
escaped_commit_message=$(echo "${COMMIT}" | sed -z 's/\\n/\\n/g' | jq -R .)
escaped_commit_message=$(echo "${COMMIT}" | sed -z 's/\\/\\\\/g; s/"/\\"/g; s/'\''/\\&/g; s/\n/\\n/g')
VERSION=${{ steps.get_version.outputs.VERSION }}
if [[ $VERSION == *-pre ]]
then
Expand Down

0 comments on commit 5e4bf82

Please sign in to comment.