From 402344750622e9ddf6f4afebf3188166ec4486db Mon Sep 17 00:00:00 2001 From: Jenny Li Date: Wed, 15 Dec 2021 10:49:09 +0800 Subject: [PATCH] [skip ci] Add issue comment to trigger job (#13398) Signed-off-by: Jenny Li --- .github/workflows/code-checker.yaml | 4 +++- .github/workflows/main.yaml | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/code-checker.yaml b/.github/workflows/code-checker.yaml index d97f9e71f..3feb34909 100644 --- a/.github/workflows/code-checker.yaml +++ b/.github/workflows/code-checker.yaml @@ -3,7 +3,8 @@ name: Code Checker # This workflow is triggered on pushes or pull request to the repository. on: - workflow_dispatch: + issue_comment: + types: [created] pull_request: # file paths to consider in the event. Optional; defaults to all. paths: @@ -23,6 +24,7 @@ on: jobs: ubuntu: + if: "github.event_name == 'pull_request' || (github.event_name == 'issue_comment'&& startsWith(github.event.comment.body, '/run-checks'))" name: Code Checker AMD64 Ubuntu ${{ matrix.ubuntu }} runs-on: ubuntu-latest timeout-minutes: 60 diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index ce7fcff2a..820bbcf69 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -3,7 +3,8 @@ name: Build and test # This workflow is triggered on pushes or pull request to the repository. on: - workflow_dispatch: + issue_comment: + types: [created] push: # file paths to consider in the event. Optional; defaults to all. paths: @@ -35,6 +36,7 @@ on: jobs: ubuntu: + if: "github.event_name == 'pull_request' || (github.event_name == 'issue_comment'&& startsWith(github.event.comment.body, '/run-checks'))" name: Build and test AMD64 Ubuntu ${{ matrix.ubuntu }} runs-on: ubuntu-latest timeout-minutes: 90 -- GitLab