generated from idea2app/Lark-Next-Bootstrap-ts
-
Notifications
You must be signed in to change notification settings - Fork 1
42 lines (37 loc) · 1.04 KB
/
Lark-notification.yml
File metadata and controls
42 lines (37 loc) · 1.04 KB
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
name: Lark notification
# https://docs.github.com/en/actions/writing-workflows/choosing-when-your-workflow-runs/events-that-trigger-workflows
on:
push:
issues:
pull_request:
discussion:
issue_comment:
discussion_comment:
release:
types:
- published
jobs:
send-Lark-message:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Event Message serialization
id: message
run: |
YAML=$(echo '${{ toJSON(github) }}' | deno --allow-all .github/scripts/transform-message.ts)
{
echo 'content<<EOF'
echo $YAML
echo 'EOF'
} >> $GITHUB_OUTPUT
- name: Send message to Lark
if: ${{ contains(steps.message.outputs.content, ':') }}
uses: foxundermoon/feishu-action@v2
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: post
content: |
${{ steps.message.outputs.content }}