Skip to content

Commit

Permalink
Adding Slack message
Browse files Browse the repository at this point in the history
  • Loading branch information
bryantson committed May 25, 2022
1 parent a8a67c2 commit b192839
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/action-send-slack.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Send Slack message

on:
workflow_dispatch:
inputs:
greeting:
description: "Please type in your greeting!"
required: true
default: ''

jobs:
Hello-GitHub-Actions:
runs-on: ubuntu-latest
name: Post to a Slack channel

steps:
- name: Hello, GitHub Actions
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'YOUR_SLACK_CHANNEL_ID'
slack-message: 'Posting from GitHub Actions! Here is my greeting: ${{ github.event.inputs.greeting }}'
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_TOKEN }}
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ Sample GitHub Actions workflows included in this repo
| [`.github/workflows/action-multiple-self-hosted-runners.yml`](/.github/workflows/action-multiple-self-hosted-runners.yml) | Example of using multiple runners including self-hosted runners |
| [`.github/workflows/action-issueops.yml`](/.github/workflows/action-issueops.yml) | Example of IssueOps workflow |
| [`.github/workflows/action-migrate-containers.yml`](/.github/workflows/action-migrate-containers.yml) | Example of migrating containers from DockerHub to GitHub Container registry |
| [`.github/workflows/action-send-slack.yml`](/.github/workflows/action-send-slack.yml) | Example of sending a Slack message from Actions |

Sample GitHub Package registry codes included in this repo

Expand Down

0 comments on commit b192839

Please sign in to comment.