From 69a8c37147151522ade85ea257a8b7a7bf3ead2f Mon Sep 17 00:00:00 2001 From: Ming Tsai <37890026+ming-tsai@users.noreply.github.com> Date: Fri, 16 Apr 2021 14:43:30 -0400 Subject: [PATCH] chore: only run cpp action on its file change --- .github/workflows/cpplint.yml | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/.github/workflows/cpplint.yml b/.github/workflows/cpplint.yml index e100bf14..965e596b 100644 --- a/.github/workflows/cpplint.yml +++ b/.github/workflows/cpplint.yml @@ -1,8 +1,15 @@ # GitHub Action to run cpplint recursively on all pushes and pull requests # https://github.com/cpplint/GitHub-Action-for-cpplint -name: cpplint -on: [push, pull_request] +name: C++ +on: + push: + branches: [ main ] + paths: '**/**.cpp' + pull_request: + branches: [ main ] + paths: '**/**.cpp' + jobs: cpplint: runs-on: ubuntu-latest