Skip to content

Notifications

Notifications #19

Workflow file for this run

name: Notifications
on:
workflow_run:
workflows: [PR,Merge]
types:
- requested
- in_progess
- completed
jobs:
notify-teams-in-progress:
if: ${{github.event.workflow_run.status != 'completed'}}
runs-on: ubuntu-22.04
steps:
- uses: simbo/msteams-message-card-action@latest
with:
webhook: ${{ vars.MS_TEAMS_WEBHOOK_URI }}
title: "PR# ${{github.event.workflow_run.pull_requests[0].number}}"
message: "${{github.event.workflow_run.head_commit.message}}"
color: ff69b4
buttons: |
Pull Request ${{github.event.workflow_run.pull_requests[0].number}} ${{github.event.workflow_run.repository.html_url}}/pull/${{github.event.workflow_run.pull_requests[0].number}}
Diff ${{github.event.workflow_run.repository.html_url}}/pull/${{github.event.workflow_run.pull_requests[0].number}}/files
sections: |
-
activity:
title: ${{github.event.workflow_run.head_commit.committer.name }}
subtitle: ${{github.event.workflow_run.head_commit.timestamp}}
image: ${{github.event.workflow_run.head_repository.owner.avatar_url}}
text: |
status: ${{github.event.workflow_run.status}}
notify-teams-completed:
if: ${{github.event.workflow_run.status == 'completed'}}
runs-on: ubuntu-22.04
steps:
- uses: simbo/msteams-message-card-action@latest
with:
webhook: ${{ vars.MS_TEAMS_WEBHOOK_URI }}
title: "PR# ${{github.event.workflow_run.pull_requests[0].number}}"
message: "${{github.event.workflow_run.head_commit.message}}"
color: 28a745
buttons: |
Pull Request ${{github.event.workflow_run.pull_requests[0].number}} ${{github.event.workflow_run.repository.html_url}}/pull/${{github.event.workflow_run.pull_requests[0].number}}
Diff ${{github.event.workflow_run.repository.html_url}}/pull/${{github.event.workflow_run.pull_requests[0].number}}/files
sections: |
-
activity:
title: ${{github.event.workflow_run.head_commit.committer.name}}
subtitle: ${{github.event.workflow_run.head_commit.timestamp}}
image: ${{github.event.workflow_run.head_repository.owner.avatar_url}}
text: |
status: ${{github.event.workflow_run.status}}