From 0ec8527bae205091a243a091d3d2f1b7018f3df5 Mon Sep 17 00:00:00 2001 From: Volodymyr Vreshch Date: Fri, 26 Jun 2026 20:12:41 +0200 Subject: [PATCH] fix(ci): read commit message via env in deploy summary (avoid JS injection breaking template literal) --- .github/workflows/deploy.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 213be6f..4372607 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -183,13 +183,15 @@ jobs: steps: - name: 📊 Generate summary uses: actions/github-script@v9 + env: + COMMIT_MESSAGE: ${{ github.event.head_commit.message }} with: script: | const buildResult = '${{ needs.build-and-push.result }}'; const deployResult = '${{ needs.deploy.result }}'; const imageTag = '${{ needs.build-and-push.outputs.image-tag }}'; const commitSha = '${{ github.sha }}'; - const commitMessage = `${{ github.event.head_commit.message }}` || 'Manual deployment'; + const commitMessage = process.env.COMMIT_MESSAGE || 'Manual deployment'; const eventName = '${{ github.event_name }}'; const triggerType = eventName === 'workflow_dispatch' ? 'Manual' : 'Automatic (push)';