githubuniverseworkshops / GitHub-Actions-Planet-GitHubUniverse2021

Welcome to GitHub Actions planet, which lives among the GitHub Universe and is a place with full of joys, knowledges, and activities
9 stars 5 forks source link

Send Message continent #5

Closed bryantson closed 3 years ago

bryantson commented 3 years ago

Welcome to Send Message continent

5_SendMessage

Before crossing the long ocean, we need to send messages to our friends and families that we are alive and okay

Your mission

Learn about different GitHub Actions plugins to send messages

You can find different GitHub Actions plugin to send messages or to notify users in GitHub Actions Marketplace

image

For example, you can send a Slack message through Slack by just including slackapi/slack-github-action GitHub Actions plugin.

- name: Post to a Slack channel
  id: slack
  uses: slackapi/slack-github-action@v1.14.0
  with:
    channel-id: 'CHANNEL_ID'  # Slack channel id to post message
    slack-message: 'posting from a github action!'
  env:
    SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}

And there is even a way to send a text message through Twilio!

- name: 'Sending SMS Notification'
  uses: twilio-labs/actions-sms@v1
  with:
    fromPhoneNumber: '+1(234)5678901'
    toPhoneNumber: '+1(234)3334444'
    message: 'Hello from Twilio'
  env:
    TWILIO_ACCOUNT_SID: ${{ secrets.TWILIO_ACCOUNT_SID }}
    TWILIO_API_KEY: ${{ secrets.TWILIO_API_KEY }}
    TWILIO_API_SECRET: ${{ secrets.TWILIO_API_SECRET }}

Activity - Send messages through Microsoft Teams and Slack

We will send our greeting messages from GitHub Actions planet through Slack and Microsoft Teams. To do so, we can utilize these different GitHub Actions pipeline script under .github/workflows:

⏭️ After you are done, you can close this issue to move forward to next one.

github-actions[bot] commented 3 years ago

Congratulation. You are done with Send Message continent

image

Let's move to the next issue