Skip to content

Commit bcfce60

Browse files
committed
BUG: Prevent duplicate builds on pull request, push
When a branch is pushed to the same repository, i.e. not a fork, and a pull request is made, duplicate builds will be generated for both the pull request and push. Instead, only generate builds for pull requests against main and pushes to main.
1 parent 0d54bc7 commit bcfce60

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.github/workflows/build-test-package.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Build, test, package
22

3-
on: [push,pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
410

511
env:
612
itk-git-tag: "v5.4.0"

{{cookiecutter.project_name}}/.github/workflows/build-test-package.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
11
name: Build, test, package
22

3-
on: [push,pull_request]
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
410

511
jobs:
612
cxx-build-workflow:

0 commit comments

Comments
 (0)