Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion send-slack-notification/action.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ inputs:
description: The result of the build job
publish-manifests-result:
description: The result of the publish manifests job
publish-helm-chart-result:
description: The result of the publish helm chart job (if any)
default: "N/A"
test-result:
description: The result of an integration test
test-health:
Expand All @@ -28,6 +31,7 @@ runs:
NOTIFICATION_TYPE: ${{ inputs.type }}

PUBLISH_MANIFESTS_RESULT: ${{ inputs.publish-manifests-result }}
PUBLISH_HELM_CHART_RESULT: ${{ inputs.publish-helm-chart-result }}
BUILD_RESULT: ${{ inputs.build-result }}

FAILED_TESTS: ${{ inputs.failed-tests }}
Expand All @@ -45,6 +49,7 @@ runs:
[ -z "${BUILD_RESULT:-}" ] && echo "The build-result input must be provided" && exit 1

echo "PUBLISH_MANIFESTS_RESULT=$PUBLISH_MANIFESTS_RESULT" | tee -a "$GITHUB_ENV"
echo "PUBLISH_HELM_CHART_RESULT=$PUBLISH_HELM_CHART_RESULT" | tee -a "$GITHUB_ENV"
echo "BUILD_RESULT=$BUILD_RESULT" | tee -a "$GITHUB_ENV"
elif [ "$NOTIFICATION_TYPE" == "integration-test" ]; then
[ -z "${TEST_RESULT:-}" ] && echo "The test-result input must be provided" && exit 1
Expand Down Expand Up @@ -89,7 +94,7 @@ runs:

if [ "$NOTIFICATION_TYPE" == "container-image-build" ]; then
# TODO (@Techassi): Also add success template
if [ "$PUBLISH_MANIFESTS_RESULT" = "failure" ] || [ "$BUILD_RESULT" = "failure" ]; then
if [ "$PUBLISH_MANIFESTS_RESULT" = "failure" ] || [ "$PUBLISH_HELM_CHART_RESULT" = "failure" ] || [ "$BUILD_RESULT" = "failure" ]; then
export MESSAGE_VERB=failed
export MESSAGE_COLOR=aa0000
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,9 @@ attachments:
- title: Build/Publish Manifests
short: true
value: "${PUBLISH_MANIFESTS_RESULT}"
- title: Build/Publish Helm Chart
short: true
value: "${PUBLISH_HELM_CHART_RESULT}"
actions:
- type: button
text: Go to workflow run
Expand Down