diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml index c04244f0..f091ed26 100644 --- a/.github/workflows/maven.yml +++ b/.github/workflows/maven.yml @@ -1,27 +1,20 @@ -# This workflow will build a Java project with Maven -# For more information see: https://help.github.com/actions/language-and-framework-guides/building-and-testing-java-with-maven - -name: Java CI with Maven +name: CI on: push: - branches: [ master ] + branches: [ "master" ] pull_request: - branches: [ master ] + branches: [ "master" ] jobs: build: - - runs-on: ubuntu-latest strategy: - matrix: - java: [ '8', '11'] - steps: - - uses: actions/checkout@v2 - - name: Set up JDK ${{ matrix.Java }} - uses: actions/setup-java@v2 - with: - java-version: ${{ matrix.Java }} - distribution: 'adopt' - - name: Build with Maven - run: mvn -B package --file pom.xml + matrix: + java: [ '8', '11'] + uses: mekomsolutions/shared-github-workflow/.github/workflows/maven-build-test.yml@main + uses: actions/setup-java@v2 + with: + java-version: ${{ matrix.Java }} + secrets: + NEXUS_USERNAME: ${{ secrets.NEXUS_USERNAME }} + NEXUS_PASSWORD: ${{ secrets.NEXUS_PASSWORD }}