forked from 0xTylerHolmes/ethereum-testnet-bootstrapper
-
Notifications
You must be signed in to change notification settings - Fork 1
33 lines (28 loc) · 1011 Bytes
/
zulip_notifier.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
name: Zulip Notification Bot
on:
push:
permissions:
contents: read
jobs:
post-to-zulip:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/github-script@v7
id: generate-msg
with:
script: |
let message = `- **${context.actor}** \`${context.ref}\` | ${context.sha.substring(0,7)} | [${context.payload.head_commit.message?.split('\n')[0]}](${context.payload.compare})`
let topic = context.repo.repo
core.setOutput("topic", topic);
core.setOutput("msg", message);
- name: Send a stream message
uses: zulip/github-actions-zulip/send-message@v1
with:
api-key: ${{ secrets.ZULIP_API_KEY }}
email: ${{ secrets.ZULIP_BOT_EMAIL }}
organization-url: ${{ secrets.ZULIP_ORG_URL }}
to: "Commits"
type: "stream"
topic: ${{ steps.generate-msg.outputs.topic }}
content: ${{ steps.generate-msg.outputs.msg }}