-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
50 lines (50 loc) · 1.69 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
name: "Slack Notifier CLI"
description: "Send or update a slack notification"
inputs:
job-type:
description: "one of: test, build, deploy, publishDocs"
required: true
job-status:
description: "one of: progress, success, failure, cancelled, unknown"
required: true
service-name:
description: "The name of your service (if you don't like the default)"
required: false
service-emoji:
description: "The emoji you want to use for your service!"
required: false
slack-app-token:
description: ""
required: true
slack-channel-id:
description: ""
required: true
slack-message-id:
description: "The id of a previously published message to be updated"
required: false
outputs:
slack-message-id:
description: "Slack message id that was published"
value: ${{ steps.slack-notifier.outputs.SLACK_MESSAGE_ID }}
runs:
using: "composite"
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Download slack-notifier-cli
run: |
curl -L -o slack-notifier-cli https://github.com/monta-app/slack-notifier-cli/releases/download/v1.2.3/slack-notifier-cli
chmod +x ./slack-notifier-cli
shell: bash
- name: Run slack notifier cli
id: slack-notifier
env:
PUBLISH_SLACK_JOB_TYPE: ${{ inputs.job-type }}
PUBLISH_SLACK_JOB_STATUS: ${{ inputs.job-status }}
PUBLISH_SLACK_SERVICE_NAME: ${{ inputs.service-name }}
PUBLISH_SLACK_SERVICE_EMOJI: ${{ inputs.service-emoji }}
SLACK_APP_TOKEN: ${{ inputs.slack-app-token }}
SLACK_CHANNEL_ID: ${{ inputs.slack-channel-id }}
SLACK_MESSAGE_ID: ${{ inputs.slack-message-id }}
run: ./slack-notifier-cli
shell: bash