https://github.com/apify/slack-messages-action
It wraps up messages sending from Apify GitHub workflows into Slack.
https://github.com/apify/slack-messages-action
Last synced: 8 months ago
JSON representation
It wraps up messages sending from Apify GitHub workflows into Slack.
- Host: GitHub
- URL: https://github.com/apify/slack-messages-action
- Owner: apify
- Created: 2021-05-21T05:58:09.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2023-03-16T13:09:14.000Z (over 3 years ago)
- Last Synced: 2025-02-16T16:19:55.432Z (over 1 year ago)
- Language: TypeScript
- Homepage:
- Size: 469 KB
- Stars: 2
- Watchers: 6
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Apify Slack messages action
It wraps up messages sending from Apify GitHub workflows into Slack.
# Action input
| Name | Description | Example | Required |
| --------------------------------------- | -------------------------------------------------------------------------------- | ----------------------------------------------------------- | -------- |
| `slack-bot-user-oauth-access-token` | Slack access token | `slack-token` | yes |
| `slack-channel` | Slack channel, you can override it using SLACK_CHANNEL environment variable | `C01LBLK4FHA` | yes |
| `message` | Content of message | `*Deploy started*`| yes [1] |
| `color` | Color of message | `#0066ff` | no |
| `message-type` | Message type from prepared messages | `pre-deploy` | yes [1] |
| `version-tag` | Version tag | `v1.0.0` | no |
[1] If you need to specify message or message-type.
## Usage
```yaml
name: pre deploy message
on:
workflow_dispatch:
jobs:
pre-deploy-message:
runs-on: ubuntu-20.04
needs:
- tag
steps:
- name: clone slack-messages-action
uses: actions/checkout@v2
with:
repository: apify/slack-messages-action
ref: refs/tags/v2.0.0
path: ./.github/actions/slack-messenger
- name: pre deploy message
uses: ./.github/actions/slack-messenger
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
message: ":large_green_circle: *Deploy started*"
color: "#0066ff"
slack-channel: C01LBJK4FHA
version-tag: v0.416.0
```
Or you can use prepared message, you can find list of prepared messages in `/src/messages.ts`.
```yaml
name: pre deploy message
on:
workflow_dispatch:
jobs:
pre-deploy-message:
runs-on: ubuntu-20.04
needs:
- tag
steps:
- name: clone slack-messages-action
uses: actions/checkout@v2
with:
repository: apify/slack-messages-action
ref: refs/tags/v2.0.0
path: ./.github/actions/slack-messenger
- name: pre deploy message
uses: ./.github/actions/slack-messenger
with:
slack-bot-user-oauth-access-token: ${{ secrets.SLACK_BOT_USER_OAUTH_ACCESS_TOKEN }}
message-type: pre-deploy
slack-channel: C01LBJK4FHA
version-tag: v0.416.0
```
### Message

# TBD
- Tests
- GitHub action for publishing new version
## Contribution
1. Update code in `./src`
2. Run `npm i`
3. Run `npm run all`
4. Commit all changes including `./disc` folder with built code.
5. Publish a new version of action using new release (It needs to be done manually)