-
Notifications
You must be signed in to change notification settings - Fork 21
47 lines (42 loc) · 1.14 KB
/
Lark-notification.yml
File metadata and controls
47 lines (42 loc) · 1.14 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
43
44
45
46
47
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:
pull_request_review_comment:
release:
types:
- published
jobs:
send-Lark-message:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Event Message serialization
id: message
run: |
YAML=$(
cat <<JSON | deno run --allow-all .github/scripts/transform-message.ts
${{ toJSON(github) }}
JSON
)
{
echo 'content<<EOF'
echo "$YAML"
echo 'EOF'
} >> "$GITHUB_OUTPUT"
- name: Send message to Lark
if: ${{ contains(steps.message.outputs.content, ':') }}
uses: Open-Source-Bazaar/feishu-action@v3
with:
url: ${{ secrets.LARK_CHATBOT_HOOK_URL }}
msg_type: interactive
content: |
${{ steps.message.outputs.content }}