Skip to content

notification

notification #444

Workflow file for this run

name: notification
on:
workflow_run:
workflows:
- leanix-k8s-connector
types:
- completed
env:
SLACK-CHANNEL: '#team-helios-notifications'
jobs:
notify:
runs-on: ubuntu-latest
if: github.event.workflow_run.head_branch == 'main'
steps:
- name: Send CI/CD pipeline success message
if: ${{ github.event.workflow_run.conclusion == 'success' }}
uses: archive/github-actions-slack@v2.9.0
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_TOKEN }}
slack-channel: ${{ env.SLACK-CHANNEL }}
slack-text: |
:beers: ${{ github.repository }} successfully deployed! More information@ ${{ github.event.workflow_run.html_url }}
- name: Send CI/CD pipeline failure message
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
uses: archive/github-actions-slack@v2.9.0
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_TOKEN }}
slack-channel: ${{ env.SLACK-CHANNEL }}
slack-text: |
:no_entry_sign: ${{ github.repository }} failed to deploy! More information@ ${{ github.event.workflow_run.html_url }}