feat(nofity): add feishu notify (#46)

* 自己造的轮子

* feat(notify): sync notify to feishu using existing GitHub Action (#47)

* feat(notify): sync notify to feishu

* fix(notify): wrong usage of env secret

* feat(workflow): expand branch support in feishu_bot.yml for pull requests and pushes

* feat(ci): only run under source code changes

* feat(ci): add notification under workflows

* fix(notify): change action name to trigger workflow

* feat(notify): change secrets using repo secrets

* remove temporary push trigger

---------

Co-authored-by: Samuel Dai <samuka007@dragonos.org>
This commit is contained in:
Vitus 2025-04-08 17:33:29 +08:00 committed by GitHub
parent eeef85dd33
commit bf9f6097c9
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 50 additions and 0 deletions

40
.github/workflows/feishu-bot.yml vendored Normal file
View File

@ -0,0 +1,40 @@
name: Feishu synchronize
on:
workflow_run:
workflows: [ nix-github-actions.yml ]
types:
- completed
discussion:
types: [created, edited, answered]
discussion_comment:
types: [created]
issues:
types: [opened, edited, milestoned, pinned, reopened, closed, assigned, unassigned]
issue_comment:
types: [created, edited]
milestone:
types: [opened, deleted]
project_card:
types: [created]
pull_request:
branches: ['master', 'main', 'feature/*', 'bugfix/*', 'feat-*', 'fix-*']
types: [opened, reopened, review_requested, review_request_removed, ready_for_review, edited, assigned, unassigned]
pull_request_review:
types: [submitted, edited, dismissed]
pull_request_review_comment:
types: [created, edited, deleted]
pull_request_target:
types: [assigned, opened, synchronize, reopened]
push:
branches: ['master', 'main']
jobs:
send-event:
name: Webhook
runs-on: ubuntu-latest
steps:
- uses: Samuka007/feishu-bot-webhook-action@main
with:
webhook: ${{ secrets.FEISHU_BOT_WEBHOOK }}
signkey: ${{ secrets.FEISHU_BOT_SIGNKEY }}

View File

@ -2,7 +2,17 @@ name: Nix Flake actions
on: on:
pull_request: pull_request:
paths:
- 'crates/**'
- 'Cargo.lock'
- 'flake.lock'
- '.github/workflows/nix-github-actions.yml'
push: push:
paths:
- 'crates/**'
- 'Cargo.lock'
- 'flake.lock'
- '.github/workflows/nix-github-actions.yml'
jobs: jobs:
nix-matrix: nix-matrix: