updates to readme

This commit is contained in:
Steve Gill
2020-12-02 10:29:17 -08:00
parent b05700aac6
commit b9c29ab467
4 changed files with 63 additions and 5 deletions
+5 -2
View File
@@ -21,8 +21,11 @@ TODO
### Releasing
TODO
* Bundle the dependencies by running `npm run build`
* Update the version in `package.json`
* Commit the changes
* Create a git tag for the new version. Should be in the format `v1.4.0`. `git tag v1.4.0`
* Push changes up to GitHub `git push origin main --tags`
## Workflow
+31 -3
View File
@@ -1,5 +1,33 @@
# slack-github-action
# Slack GitHub Action
Send a github payload to Slack's workflow builder. This package also accepts a BotToken from Slack to post a message to specific channel or person in Slack.
Send data into Slack using this GitHub Action! This package has two different techniques to send data to Slack:
test
1) Send data to Slack's Workflow Builder (requires a paid Slack instance).
2) Send data via a Slack app to post to a specific channel (use an existing custom app or create a new one).
## Slack Workflow Builder Route
### Usage
```
- name: Send data to Slack workflow
id: slack
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
```
## Slack App Route
### Usage
```
- name: Post to a Slack channel
id: slack
uses: slackapi/[email protected]
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 }}
```
@@ -0,0 +1,15 @@
on: [push]
jobs:
new_push_job:
runs-on: ubuntu-latest
name: New push to repo
steps:
- name: Publish to slack channel via bot token
id: slack
uses: slackapi/[email protected]
with:
channel-id: 'SLACK_CHANNEL_ID' # ID of Slack Channel you want to post to
slack-message: 'posting from a github action!' # The message you want to post
env:
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }}
@@ -0,0 +1,12 @@
on: [push]
jobs:
new_push_job:
runs-on: ubuntu-latest
name: New push to repo
steps:
- name: Send data to Slack Workflow Builder
id: slack
uses: slackapi/[email protected]
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}