diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index b2b3197..9584dff 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,6 +1,10 @@ on: push: branches: ["**"] + pull_request: + types: + - opened + - synchronize jobs: build: @@ -16,8 +20,10 @@ jobs: - name: Cache Maven packages uses: actions/cache@v2 with: - path: ~/.m2 - key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }} + path: ~/.m2/repository # Cache the Maven repository + key: maven-${{ runner.os }}-${{ hashFiles('**/*.xml') }} + restore-keys: | + maven-${{ runner.os }}- - name: Compile run: mvn -B -Pclean install env: @@ -26,4 +32,4 @@ jobs: uses: actions/upload-artifact@v2 with: name: AntiVPN - path: Assembly/target/Assembly-*.jar \ No newline at end of file + path: Assembly/target/Assembly-*.jar