Fixing double runs when pushing to a branch with an open PR

Right now if you push to a branch with an open PR, both the PR and an push triggers fire, causing the workflow to run twice. This limits it to only run on pushes to develop and master, or on PRs to those branches.
This also adds in a workflow_dispatch trigger to be able to manually kick runs from any branch if desired.
This commit is contained in:
Kevin Bost
2024-09-29 14:32:38 -07:00
committed by Caelan
parent 9c52e40dad
commit 78d9706f46

View File

@@ -1,6 +1,11 @@
name: Build
on: [ push, pull_request ]
on:
push:
branches: [master, develop]
pull_request:
branches: [master, develop]
workflow_dispatch:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}