Khan/pull-request-comment-trigger

Multiple trigger key check

Opened this issue · 0 comments

I was trying to check multiple keywords to trigger the same workflow based on the input and passing the input comment as parameter to a shell script. Does this support multiple keyword check with an OR ('|') operator? or some other way.

Below is my workflow contents:

on:
issue_comment:
types: [created]

jobs:
deploy:
runs-on: macos-latest
steps:
- uses: khan/pull-request-comment-trigger@master
id: check
with:
trigger: 'qabuild | prodbuild'
prefix_only: true
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
- run: 'echo Found one of the keywords!'
if: steps.check.outputs.triggered == 'true'
- name: run the trigger script
if: steps.check.outputs.triggered == 'true'
run: sudo sh ./.github/scripts/trigger_build.sh ${{ github.event.comment.body }}

I was able to run it successfully with just one trigger keyword but failing when I add other keywords with OR operator.