name: Java CI

on:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v1
      with:
        java-version: 1.8
        distribution: 'adopt'
        server-id: ossrh
        server-username: MAVEN_USERNAME
        server-password: MAVEN_PASSWORD
    - name: Cache Maven packages
      uses: actions/cache@v2
      with:
        path: ~/.m2
        key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
        restore-keys: ${{ runner.os }}-m2
    - name: Build with Maven
      run: mvn -B -Ddockerfile.skip deploy
      env:
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

name: Java CI

on:
  push:
    branches:
      - master

jobs:
  build:

    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Set up JDK 1.8
      uses: actions/setup-java@v2
      with:
        java-version: 1.8
        distribution: 'adopt'
        server-id: ossrh
        server-username: MAVEN_USERNAME
        server-password: MAVEN_PASSWORD
    #- name: Cache Maven packages
    #  uses: actions/cache@v2
    #  with:
    #    path: ~/.m2
    #    key: ${{ runner.os }}-m2-${{ hashFiles('**/pom.xml') }}
    #    restore-keys: ${{ runner.os }}-m2
    - name: Build with Maven
      run: mvn -B -Ddockerfile.skip deploy
      env:
          MAVEN_USERNAME: ${{ secrets.OSSRH_USERNAME }}
          MAVEN_PASSWORD: ${{ secrets.OSSRH_TOKEN }}

Update action for java setup to version 2
Update action for java setup to version 2

Comment out maven packages caching to trace issue with maven deploy