Add workflow triggers and job condition

This commit is contained in:
ted-cdw 2023-02-23 16:10:36 -05:00
parent de3b33d488
commit 8456a74773

View file

@ -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