File tree Expand file tree Collapse file tree 1 file changed +16
-0
lines changed
Expand file tree Collapse file tree 1 file changed +16
-0
lines changed Original file line number Diff line number Diff line change 9292 fi
9393
9494 echo "urls=$urls" >> "$GITHUB_OUTPUT"
95+ exit 1
9596
9697 notify-slack :
9798 runs-on : ubuntu-latest
@@ -110,4 +111,19 @@ jobs:
110111 . ${GITHUB_WORKSPACE}/.github/actions/common/func.sh
111112
112113 echo "$image_urls" | slack_format_docker_image_urls_message "${{ inputs.release_tag }}" "$footer" \
114+ | curl -s --fail-with-body -d@- "${{ secrets.SLACK_WEB_HOOK_URL }}"
115+
116+ notify-slack-when-failed :
117+ runs-on : ubuntu-latest
118+ needs : collect-image-urls
119+ if : ${{ inputs.release_tag && failure() }}
120+ steps :
121+ - name : Send Failure Slack notification
122+ run : |
123+ workflow_url="https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }}"
124+ footer="Repository: ${{ github.repository }} | Commit: \`${{ github.sha }}\`"
125+
126+ . ${GITHUB_WORKSPACE}/.github/actions/common/func.sh
127+
128+ slack_format_failure_message "Docker Build failed for Redis: ${{ steps.parse-release.outputs.release_version || 'unknown'}}" "$workflow_url" "$footer" \
113129 | curl -s --fail-with-body -d@- "${{ secrets.SLACK_WEB_HOOK_URL }}"
You can’t perform that action at this time.
0 commit comments