Create comment-trigger.yml

Signed-off-by: jeet041 <mahorjitendra@gmail.com>
This commit is contained in:
jeet041 2025-04-17 12:49:45 +05:30 committed by GitHub
parent 7de083a20e
commit 85cec35d7d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

25
.github/workflows/comment-trigger.yml vendored Normal file
View file

@ -0,0 +1,25 @@
# .github/workflows/comment-trigger.yml
name: Trigger PR Tests from Comment
on:
issue_comment:
types: [created]
jobs:
dispatch:
if: |
github.event.issue.pull_request &&
startsWith(github.event.comment.body, '/run-tests')
runs-on: ubuntu-latest
steps:
- name: Checkout (not required but good practice)
uses: actions/checkout@v3
- name: Set up GitHub CLI
uses: cli/cli-action@v2
- name: Trigger PR Test Workflow
run: |
gh workflow run pr-tests.yml -f pr_number=${{ github.event.issue.number }}
env:
GH_TOKEN: ${{ secrets.PAT_TOKEN }}