Skip to content

Commit fbf0e27

Browse files
owineclaude
andcommitted
Update deployment notification to use short commit SHA
- Modified commit message step to extract and output short SHA (first 7 characters) - Updated Discord notification to use short SHA instead of full target-ref - Improves readability of deployment notifications by showing compact commit reference 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 3b799ec commit fbf0e27

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -745,7 +745,10 @@ jobs:
745745
"https://api.github.com/repos/${{ github.repository }}/commits/${{ inputs.target-ref }}" \
746746
| jq -r '.commit.message // "No commit message available"' \
747747
| head -1)
748+
SHORT_SHA="${{ inputs.target-ref }}"
749+
SHORT_SHA="${SHORT_SHA:0:7}"
748750
echo "message=$COMMIT_MSG" >> $GITHUB_OUTPUT
751+
echo "short-sha=$SHORT_SHA" >> $GITHUB_OUTPUT
749752
750753
- name: Load Discord webhook
751754
id: op-load-discord
@@ -770,7 +773,7 @@ jobs:
770773
771774
${{ needs.deploy.outputs.deployment_needed == 'true' && format('**Pipeline:** Deploy {0} → Health {1} → Cleanup {2}{3}', needs.deploy.outputs.deploy_status == 'success' && '✅' || '❌', needs.deploy.outputs.health_status == 'success' && '✅' || needs.deploy.outputs.health_status == 'skipped' && '⏭️' || '❌', needs.deploy.outputs.cleanup_status == 'success' && '✅' || needs.deploy.outputs.cleanup_status == 'skipped' && '⏭️' || '❌', needs.deploy.outputs.rollback_status != 'skipped' && format(' → Rollback {0}', needs.deploy.outputs.rollback_status == 'success' && '✅' || '❌') || '') || '**Status:** No changes detected' }}
772775
773-
${{ github.event_name == 'workflow_dispatch' && '🔧 **Manual Trigger**' || format('📝 **Commit:** `{0}` - {1}', inputs.target-ref, steps.commit-msg.outputs.message) }}
776+
${{ github.event_name == 'workflow_dispatch' && '🔧 **Manual Trigger**' || format('📝 **Commit:** `{0}` - {1}', steps.commit-msg.outputs.short-sha, steps.commit-msg.outputs.message) }}
774777
color: ${{ needs.deploy.outputs.deployment_needed != 'true' && 0x808080 || needs.deploy.outputs.deploy_status == 'success' && needs.deploy.outputs.health_status == 'success' && 0x00ff00 || needs.deploy.outputs.degraded_stacks != '' && 0xff9900 || 0xff0000 }}
775778
username: "GitHub Actions"
776779
avatar_url: "https://github.githubassets.com/images/modules/logos_page/GitHub-Mark.png"

0 commit comments

Comments
 (0)