Skip to content

add notification

add notification #28

Workflow file for this run

name: CI Workflow
on: [push]
jobs:
es-node-integration-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: '20.x'
- name: Install Foundry
uses: foundry-rs/foundry-toolchain@v1
with:
version: nightly
- name: Build and Run Bootnode Node
run: |
echo "Test Build and Run Bootnode Node" > es-node-it-bootnode.log&
exit 1
- name: Upload Blobs
run: |
mkdir integration
echo "Test Upload Blobs" > ./integration/upload.log
- name: Test
run: |
echo "Test ES-Node" > es-node-it.log&
echo "Test ItServer" > ./cmd/integration-test-server/itserver.log
- name: Upload Logs
uses: actions/upload-artifact@v4
if: always() # 无论上一步是否失败,都会执行这个步骤
with:
name: result-log
path: |
deploy.log
es-node-it-bootnode.log
./integration/upload.log
es-node-it.log
./cmd/integration-test-server/itserver.log
notification:
if: ${{ always() }}
needs: es-node-integration-test
runs-on: ubuntu-latest
steps:
- name: Send notification email
if: always() # 无论成功或失败都发送通知
uses: dawidd6/action-send-mail@v3
with:

Check failure on line 63 in .github/workflows/test.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/test.yml

Invalid workflow file

You have an error in your yaml syntax on line 63
server_address: smtp.gmail.com # 使用 Gmail SMTP
server_port: 465
username: ${{ secrets.SMTP_USERNAME }}
password: ${{ secrets.SMTP_PASSWORD }}
subject: [ethstorage/es-node] GitHub Actions ${{ github.workflow }} Run ${{ job.status }} - ${{ github.sha }}
to: [email protected],[email protected],[email protected]
from: ${{ secrets.SMTP_USERNAME }} # 发件人邮箱
body: |
"GitHub Action job completed with status: ${{ job.status }}! Check the details at ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"