Skip to content

Commit d6a9a33

Browse files
committed
Run build only on master and PRs
When a PR is created from a branch in the same repository, workflows run twice: once on `push` and once on `pull_request`. This change fixes it, by only running workflows: - On a direct push to `master`, - On a Pull Request, regardless of the origin.
1 parent 8c9ac6d commit d6a9a33

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

.github/workflows/maven.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,11 @@
1515

1616
name: Java CI
1717

18-
on: [push, pull_request]
18+
on:
19+
push:
20+
branches:
21+
- "master"
22+
pull_request: {}
1923

2024
permissions:
2125
contents: read

0 commit comments

Comments
 (0)