From 8456a7477321c3f8a18d7f5edae9a150d7aa8e1e Mon Sep 17 00:00:00 2001 From: ted-cdw Date: Thu, 23 Feb 2023 16:10:36 -0500 Subject: [PATCH] Add workflow triggers and job condition --- .github/workflows/flaskr-ci.yaml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/flaskr-ci.yaml b/.github/workflows/flaskr-ci.yaml index 11fc91d1..3553ccb6 100644 --- a/.github/workflows/flaskr-ci.yaml +++ b/.github/workflows/flaskr-ci.yaml @@ -2,9 +2,11 @@ name: Build and Test on: workflow_dispatch: # Enables manually running the workflow push: - # pull_request: - # branches: - # - main + banches: + - feature/** + pull_request: + branches: + - main jobs: tests: runs-on: ubuntu-latest @@ -36,6 +38,7 @@ jobs: # Build Docker image in a separate job so that it's not tainted by cached build/test files build-image: needs: tests + if: github.event_name == "pull_request" permissions: # Required permission to push images with the built-in GITHUB_TOKEN packages: write