Skip to content

Commit

Permalink
change the way to start workflow by comment issue
Browse files Browse the repository at this point in the history
  • Loading branch information
nycholas committed Jan 20, 2024
1 parent e7b2245 commit bd89342
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,11 @@ on:
- release/**
tags-ignore:
- v**
pull_request_review_comment:
issue_comment:
types: [created]

permissions:
actions: write
contents: read

jobs:
Expand All @@ -24,9 +25,17 @@ jobs:
- ubuntu-latest
steps:
- name: Check comment review
if: ${{ github.event_name == 'pull_request_review_comment' && !contains(github.event.comment.body, 'github-actions-workflow-tests') )}
if: >-
github.event_name == 'issue_comment' &&
github.event.issue.pull_request &&
!contains(github.event.issue.body, 'github-actions-workflow: tests')
uses: action-pack/cancel@v1
- name: Comment about start of workflow
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PR_ID: ${{ github.event.pull_request.html_url }}
run: |
exit 1
gh pr comment $PR_ID --body 'The "Tests [Docker]" workflow will be started.'
unit-tests:
name: Unit tests
Expand Down

0 comments on commit bd89342

Please sign in to comment.