You're viewing an older version of this GitHub Action. Do you want to see the latest version instead?
GitHub Action
Slack Send Message Clicksign
v2.0.0
Action send message to slack
Use this template to bootstrap the creation of a TypeScript action.:rocket:
This template includes compilation support, tests, a validation workflow, publishing, and versioning guidance.
If you are new, there's also a simpler introduction. See the Hello World JavaScript Action
First, you'll need to have a reasonably modern version of
node
handy. This won't work with versions older than 9, for instance.
Install the dependencies
$ yarn
Build the typescript and package it for distribution
$ npm run all
The action.yml defines news inputs and output for action.
Inputs | required | default | description |
---|---|---|---|
channel_id | true | CHANGELOG.md | add channel id |
payload | false | null | add payload send message |
thread_ts | false | null | add thread id |
environment | true | Sandbox | add name environment |
template | true | 1 | template msg to slack |
jobs:
slack:
runs-on: ubuntu-latest
steps:
- name: Slack Send Message
uses: clicksign/slack-action
with:
channel_id: 'channelID'
payload: 'hello world'
thread_ts: 'threadID'
env:
SLACK_TOKEN: ${{secrets.SLACK_TOKEN}}
jobs:
slack:
runs-on: ubuntu-latest
steps:
- name: Slack Send Message
uses: clicksign/slack-action
with:
channel_id: 'channelID'
template: '2'
thread_ts: 'threadID'
env:
SLACK_TOKEN: ${{secrets.SLACK_TOKEN}}
The templates in templates-default.ts.
Template | description |
---|---|
1 | @channel Iniciado Deploy repository_name main em Sandbox |
2 | @channel Finalizado Deploy repository_name main em Sandbox |
3 | @channel Falha Deploy repository_name main em Sandbox |