Only notify on nightly builds

Signed-off-by: Pedro Algarvio <palgarvio@vmware.com>
This commit is contained in:
Pedro Algarvio 2023-05-25 18:38:39 +01:00 committed by Pedro Algarvio
parent 06d1aad477
commit 58f0fff65d
2 changed files with 5 additions and 21 deletions

View file

@ -2736,27 +2736,6 @@ jobs:
id: get-workflow-info
uses: technote-space/workflow-conclusion-action@v3
- name: Notify Slack
id: slack
uses: slackapi/slack-github-action@v1.24.0
with:
payload: |
{
"text": "Nightly Workflow build result: ${{ job.status }}\n${{ github.event.head_commit.url }}",
"blocks": [
{
"type": "section",
"text": {
"type": "mrkdwn",
"text": "GitHub Action build result: ${{ job.status }}\n${{ github.event.head_commit.url }}"
}
}
]
}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
- name: Set Pipeline Exit Status
shell: bash
run: |

View file

@ -119,6 +119,8 @@ concurrency:
<%- block set_pipeline_exit_status_extra_steps %>
<%- if workflow_slug == "nightly" %>
- name: Notify Slack
id: slack
uses: slackapi/slack-github-action@v1.24.0
@ -139,4 +141,7 @@ concurrency:
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
<%- endif %>
<%- endblock set_pipeline_exit_status_extra_steps %>