Skip to content

Commit 0f5fdc9

Browse files
authored
Run builds only on push to master and pull requests (#423)
* 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. * fix: replace double with single quotes Replaces `"` with `'` as suggested in the review.
1 parent 5a6f78a commit 0f5fdc9

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)