Skip to content

Commit 0cf8488

Browse files
committed
fix: 커밋 특수문자 처리
1 parent 6c8c380 commit 0cf8488

1 file changed

Lines changed: 12 additions & 9 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 12 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -141,15 +141,18 @@ jobs:
141141
ENVIRONMENT=$([[ "${{ github.ref_name }}" == "main" ]] && echo "Production" || echo "Stage")
142142
COMMIT_MSG=$(echo "${{ github.event.head_commit.message }}" | head -1)
143143
RUN_URL="${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
144+
ACTOR=${{ steps.resolve_actor.outputs.actorName }}
145+
146+
BODY=$(jq -n \
147+
--arg status "$STATUS" \
148+
--arg environment "$ENVIRONMENT" \
149+
--arg repository "${{ github.repository }}" \
150+
--arg branch "${{ github.ref_name }}" \
151+
--arg actor "$ACTOR" \
152+
--arg commitMessage "$COMMIT_MSG" \
153+
--arg runUrl "$RUN_URL" \
154+
'{status: $status, environment: $environment, repository: $repository, branch: $branch, actor: $actor, commitMessage: $commitMessage, runUrl: $runUrl}')
144155
145156
curl -X POST https://api-slack.internal.bcsdlab.com/api/deploy/frontend \
146157
-H 'Content-Type: application/json' \
147-
-d "{
148-
\"status\": \"$STATUS\",
149-
\"environment\": \"$ENVIRONMENT\",
150-
\"repository\": \"${{ github.repository }}\",
151-
\"branch\": \"${{ github.ref_name }}\",
152-
\"actor\": ${{ steps.resolve_actor.outputs.actorName }},
153-
\"commitMessage\": \"$COMMIT_MSG\",
154-
\"runUrl\": \"$RUN_URL\"
155-
}"
158+
-d "$BODY"

0 commit comments

Comments
 (0)