Skip to content

Commit

Permalink
add issue comment for ci yaml
Browse files Browse the repository at this point in the history
  • Loading branch information
nick authored and nick committed Nov 7, 2023
1 parent 3152f48 commit 7ab45b1
Showing 1 changed file with 19 additions and 11 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,16 +1,24 @@
on:
issue_comment:
types:
- created
on: issue_comment

jobs:
build:
pr_commented:
# This job only runs for pull request comments
name: PR comment
if: ${{ github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- run: |
echo A comment on PR $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}
issue_commented:
# This job only runs for issue comments
name: Issue comment
if: ${{ !github.event.issue.pull_request }}
runs-on: ubuntu-latest
steps:
- name: Check PR Comment
run: |
if [[ "${{ github.event.comment.body }}" == *"/trigger-ci"* ]]; then
echo "CI triggered by comment"
# Add your build and test steps here
fi
- run: |
echo A comment on issue $NUMBER
env:
NUMBER: ${{ github.event.issue.number }}

0 comments on commit 7ab45b1

Please sign in to comment.