From 1bfd8af51d4f5780686eba99bab9ee4485f3d125 Mon Sep 17 00:00:00 2001 From: Shivani Brijmohan <36177801+sbrij001@users.noreply.github.com> Date: Mon, 9 Sep 2024 16:31:42 -0400 Subject: [PATCH 1/2] Update README: Replace API Key with Auth Token and Reflect Changes in YAML File --- README.md | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/README.md b/README.md index 48cd94c9..7e28d574 100644 --- a/README.md +++ b/README.md @@ -5,11 +5,11 @@ Send an SMS from GitHub Actions. ## Prerequisites - A Twilio Account. [Sign up for free](https://www.twilio.com/try-twilio) -- A [Twilio API Key and Secret](https://www.twilio.com/docs/iam/keys/api-key) +- A [Twilio Auth Token](https://www.twilio.com/docs/iam/api/authtoken) ## Usage -1. Set up your credentials as secrets in your repository settings using `TWILIO_ACCOUNT_SID`, `TWILIO_API_KEY`, `TWILIO_API_SECRET` +1. Set up your credentials as secrets in your repository settings using `TWILIO_ACCOUNT_SID`, `TWILIO_AUTH_TOKEN`, `TO_PHONE_NUMBER`, `FROM_PHONE_NUMBER` 2. Add the following to your workflow @@ -32,8 +32,8 @@ jobs: - name: 'Sending SMS Notification' uses: twilio-labs/actions-sms@v1 with: - fromPhoneNumber: '+12345678900' # alternatively, use a Repository Secret - toPhoneNumber: '+12345678900' # alternatively, use a Repository Secret + fromPhoneNumber: ${{ secrets.FROM_PHONE_NUMBER }} # alternatively, use a Repository Secret + toPhoneNumber: ${{ secrets.TO_PHONE_NUMBER }} # alternatively, use a Repository Secret message: 'Hello from Twilio' ``` @@ -55,13 +55,9 @@ jobs: A Twilio Account SID. Can alternatively be stored in environment -### `TWILIO_API_KEY` +### `TWILIO_AUTH_TOKEN` -A Twilio API Key. Can alternatively be stored in environment - -### `TWILIO_API_SECRET` - -A Twilio API Secret. Can alternatively be stored in environment +A Twilio Auth Token. Can alternatively be stored in environment ## Outputs From 59b4a6c5b1b709487559c41bc713d7b87e35c9bf Mon Sep 17 00:00:00 2001 From: sbrij001 Date: Wed, 25 Sep 2024 10:09:57 -0400 Subject: [PATCH 2/2] change code sample and update prereqs --- README.md | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 7e28d574..f07538d5 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ Send an SMS from GitHub Actions. - A Twilio Account. [Sign up for free](https://www.twilio.com/try-twilio) - A [Twilio Auth Token](https://www.twilio.com/docs/iam/api/authtoken) +- A [Registered Phone Number](https://www.twilio.com/docs/phone-numbers/regulatory/faq) ## Usage @@ -14,14 +15,14 @@ Send an SMS from GitHub Actions. 2. Add the following to your workflow ```yml -name: Twilio Sned +name: Twilio Send on: workflow_dispatch: # allows you to manually trigger the workflow schedule: # runs on a cron, nightly - cron: 0 0 * * * env: TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }} - TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }} + TWILIO_AUTH_TOKEN: ${{ secrets.TWILIO_AUTH_TOKEN }} TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }} permissions: contents: read @@ -32,18 +33,18 @@ jobs: - name: 'Sending SMS Notification' uses: twilio-labs/actions-sms@v1 with: - fromPhoneNumber: ${{ secrets.FROM_PHONE_NUMBER }} # alternatively, use a Repository Secret - toPhoneNumber: ${{ secrets.TO_PHONE_NUMBER }} # alternatively, use a Repository Secret + FROM_PHONE_NUMBER: ${{ secrets.FROM_PHONE_NUMBER }} + TO_PHONE_NUMBER: ${{ secrets.TO_PHONE_NUMBER }} message: 'Hello from Twilio' ``` ## Inputs -### `fromPhoneNumber` +### `FROM_PHONE_NUMBER` **Required** Phone number in your Twilio account to send the SMS from -### `toPhoneNumber` +### `TO_PHONE_NUMBER` **Required** Phone number to send the SMS to