Sam*_*fer 6 github github-actions
We have a scheduled github action that fails sometimes. How can I receive email notifications if it fails. At the moment, only the creator of the workflow receives email notifications when it fails.
小智 8
你可以在你的行动中尝试这个
- name: Send mail
if: failure()
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
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
3816 次 |
| 最近记录: |