gpt4 book ai didi

github Action : notifications on workflow failure

转载 作者:行者123 更新时间:2023-12-03 17:24:49 34 4
gpt4 key购买 nike

我们有一个计划的github action有时会失败。如果失败,我如何接收电子邮件通知。目前,只有工作流的创建者在失败时会收到电子邮件通知。

my settings

最佳答案

你可以在行动中尝试

- name: Send mail
if: always()
uses: dawidd6/action-send-mail@v2
with:
# mail server settings
server_address: smtp.gmail.com
server_port: 465
# user credentials
username: ${{ secrets.EMAIL_USERNAME }}
password: ${{ secrets.EMAIL_PASSWORD }}
# email subject
subject: ${{ github.job }} job of ${{ github.repository }} has ${{ job.status }}
# email body as text
body: ${{ github.job }} job in worflow ${{ github.workflow }} of ${{ github.repository }} has ${{ job.status }}
# comma-separated string, send email to
to: abc@gmail.com,xyz@gmail.com
# from email name
from: XYZ

关于github Action : notifications on workflow failure,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/62304258/

34 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com