Skip to content

Commit

Permalink
test send email for action result
Browse files Browse the repository at this point in the history
  • Loading branch information
ping-ke committed Oct 14, 2024
1 parent 2fdb654 commit e3def5c
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
name: CI Workflow

on: [push]

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Run tests
run: npm test

- name: Notify on Slack
if: always() # 无论成功或失败,始终发送通知
uses: slackapi/[email protected]
with:
slack-message: |
工作流 ${{ github.workflow }} 已完成。
状态: ${{ job.status }}
触发者: ${{ github.actor }}
仓库: ${{ github.repository }}
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}

0 comments on commit e3def5c

Please sign in to comment.