forked from OpenCPN/OpenCPN
-
Notifications
You must be signed in to change notification settings - Fork 0
42 lines (39 loc) · 1.49 KB
/
zulip.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
---
# yamllint disable rule:truthy
on:
workflow_run:
# Must restrict to given workflows:
# https://github.com/community/community/discussions/16059
workflows: [MacOS, Windows]
types: [completed]
env:
CONCLUSION: ${{ github.event.workflow_run.conclusion }}
GIT_COMMIT: ${{ github.event.workflow_run.head_commit.id }}
GIT_MESSAGE: ${{ github.event.workflow_run.head_commit.message }}
JOB_URL: ${{ github.event.workflow_run.html_url }}
JOB_NAME: ${{ github.event.workflow_run.name }}
REPO_URL: ${{ github.event.workflow_run.head_repository.html_url }}
jobs:
on-anything:
runs-on: ubuntu-latest
env:
zulip_api_key: ${{ secrets.ZULIP_API_KEY }}
steps:
- run: echo "GITHUB_ACTOR=$GITHUB_ACTOR" >> $GITHUB_ENV
- run: echo "SHORT_SHA=${GITHUB_SHA:0:8}" >> $GITHUB_ENV
- if: ${{ env.zulip_api_key != ''}}
name: Tell Zulip
uses: zulip/github-actions-zulip/send-message@v1
with:
email: [email protected]
api-key: ${{ secrets.ZULIP_API_KEY }}
organization-url: 'https://opencpn.zulipchat.com'
type: 'stream'
to: 'CI'
topic: 'OpenCPN'
content: |
Workflow ${{ env.JOB_NAME }} completed: [
${{ env.CONCLUSION }}](${{ env.JOB_URL }})
- Started by: ${{ env.GITHUB_ACTOR }}
- last commit: [${{ env.SHORT_SHA }}, ${{ env.GIT_MESSAGE }}](
${{ env.REPO_URL }}/commit/${{ env.GIT_COMMIT }})