-
Notifications
You must be signed in to change notification settings - Fork 290
25 lines (24 loc) · 861 Bytes
/
main.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
name: ChatOps
on:
issue_comment:
types: [ created,updated ]
jobs:
command:
runs-on: ubuntu-latest
steps:
- uses: jungwinter/split@v1
id: split
with:
msg: ${{ github.event.comment.body }}
- uses: peter-evans/repository-dispatch@v1
if: steps.split.outputs._0 == '/release' && steps.split.outputs._2 == 'qa'
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: release-to-env
client-payload: '{ "tag": "${{steps.split.outputs._1}}" ,"prerelease": true }'
- uses: peter-evans/repository-dispatch@v1
if: steps.split.outputs._0 == '/release' && steps.split.outputs._2 == 'prod'
with:
token: ${{ secrets.REPO_ACCESS_TOKEN }}
event-type: release-to-env
client-payload: '{ "tag": "${{steps.split.outputs._1}}" ,"prerelease": false }'