From 4fb5c43ecda475f3ffd60704201ecf4170a79364 Mon Sep 17 00:00:00 2001 From: Janice Lan Date: Wed, 25 Sep 2024 15:52:28 -0700 Subject: [PATCH] change github actions to run only on PRs and merge to main (#5) --- .github/workflows/headers.yml | 7 ++++++- .github/workflows/style.yml | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/.github/workflows/headers.yml b/.github/workflows/headers.yml index 397a853..06dfd1f 100644 --- a/.github/workflows/headers.yml +++ b/.github/workflows/headers.yml @@ -1,7 +1,12 @@ name: headers run-name: License headers check by ${{ github.actor }} -on: [push, pull_request] +on: + # Trigger the workflow on push to main or any pull request + push: + branches: + - main + pull_request: jobs: header-checks: diff --git a/.github/workflows/style.yml b/.github/workflows/style.yml index 2edbc35..3a6c006 100644 --- a/.github/workflows/style.yml +++ b/.github/workflows/style.yml @@ -1,7 +1,12 @@ name: style run-name: Style test by ${{ github.actor }} -on: [push, pull_request] +on: + # Trigger the workflow on push to main or any pull request + push: + branches: + - main + pull_request: jobs: style-tests: