A GitHub Action to send emails using Resend. Works great for GH Action health checks.
Note: You can't specify a "from" domain. It just uses the generic Resend domain (i.e.
@resend.dev
).
name: Health Check
on:
schedule:
- cron: '*/30 * * * *'
workflow_dispatch:
jobs:
healthcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Check production endpoint
uses: jtalk/url-health-check-action@v3
with:
url: https://example.com
max-attempts: 3
retry-delay: 5s
follow-redirect: true
- name: Send notification via Resend
if: failure()
uses: corysimmons/resend-email-action@v1
with:
api-key: ${{ secrets.RESEND_API_KEY }}
from: Resend GitHub Action <[email protected]>
to: [email protected]
subject: Health Check Failed
text: The production site at https://example.com is not responding correctly