Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Multiple trigger key check #10

Open
satishreddyg opened this issue Oct 26, 2020 · 0 comments
Open

Multiple trigger key check #10

satishreddyg opened this issue Oct 26, 2020 · 0 comments

Comments

@satishreddyg
Copy link

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.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant