From 6d20db415546087095ee4a23ae9c7faf554ed865 Mon Sep 17 00:00:00 2001 From: Chakradhar Rao Jonagam Date: Sun, 27 Sep 2020 23:42:29 -0700 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index cf4f6c7..ee65420 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,15 +7,19 @@ 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: contains(github.event.comment.body, '/deploy-qa') + 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": "v11","prerelease": true }' + client-payload: '{ "tag": ${{steps.split.outputs._1}} ,"prerelease": true }' - uses: peter-evans/repository-dispatch@v1 - if: contains(github.event.comment.body, '/deploy-prod') + 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": "v11","prerelease": false }' + client-payload: '{ "tag": ${{steps.split.outputs._1}} ,"prerelease": false }'