Content Deep Dive
Get SMS Alerts with Twilio When GitHub Actions Fail
Blog post from Twilio
Post Details
Company
Date Published
Author
Rishab Kumar
Word Count
1,099
Language
English
Hacker News Points
-
Summary
This workflow allows you to receive SMS alerts when a GitHub Action fails, by integrating Twilio's SMS service. The workflow is triggered on every push to the main branch and checks out the repository using `actions/checkout`. It then runs a simple "Hello World" script and builds an alert job that sends an SMS notification if the build action fails. The alert job uses the `twilio-labs/actions-sms` GitHub Action, which requires Twilio credentials to be stored as secrets in the repository settings. The message body of the alert includes the job ID and status for informational purposes. When a commit is made, the workflow triggers, and if the build action fails, an SMS notification is sent to the specified phone number.