【问题标题】:Get email notification from github actions failure using AWS SES使用 AWS SES 从 github 操作失败中获取电子邮件通知
【发布时间】:2022-10-21 20:16:17
【问题描述】:

我已经配置了 github Action 来自动化应用部署。我现在正在尝试的是使用 AWS SES 获取有关操作失败的电子邮件通知。我用过发邮件链接中给出的功能。

1. https://github.com/marketplace/actions/send-email

这是我的代码

- name: Send mail
  if: always()
  uses: dawidd6/action-send-mail@v3
  with:
    # mail server settings
    server_address: ${{secrets.SMTP_HOST}}
    server_port: 465
    # Optional (recommended): mail server username:
    username: ${{secrets.SMTP_USERNAME}}
    # Optional (recommended) mail server password:
    password: ${{secrets.SMTP_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: xyz@example.com
    # from email name
    from: 'abc@example.com'

笔记:

  1. 我的域 example.com 已在 SES 中验证
  2. 我的往返地址已在 SES 中验证
  3. 我不在沙盒模式

    我得到的错误

    with:
     server_address: ***
     server_port: 465
     username: ***
     password: ***
     subject: job1 job of ***/pv-core has success
     body: job1 job in worflow TestCI of ***/pv-core has success
     to: xyz@***.com
     from: *** "abc@***.com"
    

    错误:邮件命令失败:501 提供的 MAIL FROM 地址无效

    预期产出

    需要提醒 xyz@example.com(其别名电子邮件将发送给 5 名成员的团队) 每当动作失败

【问题讨论】:

    标签: amazon-web-services github amazon-ses cicd


    【解决方案1】:

    https://github.com/dawidd6/action-send-mail/pull/38#issuecomment-923132798

    如果您检查所有者提到的 PR,则它超出了范围。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2016-11-17
      • 2017-12-19
      • 2018-05-29
      • 2017-06-06
      • 1970-01-01
      • 2018-08-08
      • 2017-07-06
      相关资源
      最近更新 更多