Skip to content

Commit

Permalink
Add the Commit sha of the branch or tag deployed
Browse files Browse the repository at this point in the history
  • Loading branch information
Eeebru committed Jan 16, 2024
1 parent f197c27 commit 5336223
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions report-deployment-status-to-slack/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ inputs:
tag:
description: "The name of the branch or tag."
required: true
commit-sha:
description: "The SHA of the branch or tag."
required: true
environment:
description: "The name of the environment."
required: true
Expand Down Expand Up @@ -56,23 +59,27 @@ runs:
case "${{ inputs.event }}" in
start)
SLACK_MESSAGE=":loading: Updating ${{ inputs.environment }} to \`${{ inputs.tag }}\` on ${{ inputs.project }}.
${{ inputs.url }}"
${{ inputs.url }}
SHA: ${{ inputs.commit-sha }}"
;;
success)
SLACK_MESSAGE=":white_check_mark: Updated ${{ inputs.environment }} to \`${{ inputs.tag }}\` on ${{ inputs.project }}.
${{ inputs.url }}"
${{ inputs.url }}
SHA: ${{ inputs.commit-sha }}"
;;
failure)
SLACK_MESSAGE=":x: Failed to update ${{ inputs.environment }} to \`${{ inputs.tag }}\` on ${{ inputs.project }}.
${{ inputs.url }}
SHA: ${{ inputs.commit-sha }}
Please retry or contact @devops team."
;;
cancelled)
SLACK_MESSAGE=":hand: Cancelled update of ${{ inputs.environment }} to \`${{ inputs.tag }}\` on ${{ inputs.project }}.
${{ inputs.url }}"
${{ inputs.url }}
SHA: ${{ inputs.commit-sha }}"
;;
esac
Expand Down

0 comments on commit 5336223

Please sign in to comment.