mirror of
https://github.com/spring-projects/spring-petclinic.git
synced 2025-07-17 21:35:50 +00:00
Create comment-trigger.yml
Signed-off-by: jeet041 <mahorjitendra@gmail.com>
This commit is contained in:
parent
7de083a20e
commit
85cec35d7d
1 changed files with 25 additions and 0 deletions
25
.github/workflows/comment-trigger.yml
vendored
Normal file
25
.github/workflows/comment-trigger.yml
vendored
Normal 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 }}
|
Loading…
Reference in a new issue