Skip to content

Commit

Permalink
Only run CI on master branch
Browse files Browse the repository at this point in the history
  • Loading branch information
grishka committed Oct 31, 2023
1 parent 7af77d9 commit 747bb7b
Showing 1 changed file with 7 additions and 8 deletions.
15 changes: 7 additions & 8 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
name: Java CI

on: [push]
on:
push:
branches:
- master

jobs:
build:
Expand All @@ -14,16 +17,12 @@ jobs:
with:
java-version: 17
- name: Cache Maven dependencies
uses: actions/cache@v1
uses: actions/cache@v3
with:
path: ~/.m2
key: ${{ runner.os }}-build-cache-maven-${{ hashFiles('pom.xml') }}
restore-keys: |
${{ runner.os }}-build-cache-maven-
${{ runner.os }}-build-
${{ runner.os }}-
key: ${{ runner.os }}-build-cache-maven
- name: Build with Maven
run: mvn -B package --file pom.xml
run: mvn -B package
- name: Upload JAR artifact
uses: actions/upload-artifact@v1
with:
Expand Down

0 comments on commit 747bb7b

Please sign in to comment.