如何在Github操作中设置sendgrid邮件?

问题描述

我正在尝试在我的Github操作中设置SendGrid。我正在使用SendGrid操作。

根据docs,我可以使用类似的替代路径

- name: SendGrid
      uses: peter-evans/sendgrid-action@v1
      env:
        SENDGRID_API_KEY: ${{ secrets.SENDGRID_API_KEY }}
        SCRIPT_FILEPATH: ../src/helper/sendgrid/script.js

但是每次我执行Github操作时,都会收到此错误/entrypoint.sh: line 8: ../src/helper/sendgrid/script.js: not found

有什么我想念的吗?

更新: 我将路径更改为./src/helper/sendgrid/script.js,但遇到了新错误/entrypoint.sh: line 8: ./src/helper/sendgrid/script.js: Permission denied

解决方法

Each position is one row of the array错误很可能是因为脚本必须是可执行的。 授予脚本可执行文件权限,如下所示。

Permission denied

readme documentation中提到了这一点。