-
Notifications
You must be signed in to change notification settings - Fork 1
35 lines (33 loc) · 1.38 KB
/
chatops.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
name: Slash Command Dispatch
on:
issue_comment:
types: [created, edited]
jobs:
dispatch:
runs-on: ubuntu-20.04
steps:
- name: Dispatch deploy slash command
id: deploy
uses: peter-evans/slash-command-dispatch@v4
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
reaction-token: ${{ secrets.REPO_ACCESS_TOKEN }}
commands: deploy
dispatch-type: workflow
repository: dictybase/slash-command-processor-frontend
static-args: |
repository-name=${{ github.event.repository.name }}
repository-owner=${{ github.repository_owner }}
issue-number=${{ github.event.issue.number }}
html-url=${{ github.event.comment.html_url }}
comment-id=${{ github.event.comment.id }}
- name: Edit comment with error message
if: steps.deploy.outputs.error-message
uses: peter-evans/create-or-update-comment@v4
with:
comment-id: ${{ github.event.comment.id }}
body: |
> ${{ steps.deploy.outputs.error-message }}
> For /deploy commands used in GitHub Issues, you need to specify either specify a `commit` or `branch` to deploy.
> Example: `/deploy cluster=erickube branch=feature/new-command`
> For /deploy commands used in pull requests, you can optionally specify a `commit`.