---
name: CI
on:
  workflow_dispatch:
  push:
    branches-ignore:
      - main
jobs:
  ci-build:
    strategy:
      matrix:
        os: [ ubuntu-latest, windows-latest ]
        #os: [ ubuntu-latest, windows-latest, macos-latest ]
        java: [ 8, 11, 14 ]
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - name: Set up JDK
        uses: actions/setup-java@v2.3.0
        with:
          distribution: 'zulu'
          java-version: ${{ matrix.java }}
          cache: 'gradle'
      - name: docker version
        run: docker version
      - name: docker info
        run: docker info
      - name: java version
        run: java -version
      - name: Debug
        run: ./gradlew checkDockerClient --info --stacktrace
      - name: clean build
        run: ./gradlew clean build --info --stacktrace
      - name: Publish Test Report
        if: ${{ always() }}
        uses: scacap/action-surefire-report@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          report_paths: '**/build/test-results/test/TEST-*.xml'
...

---
name: CI
on:
  workflow_dispatch:
  push:
    branches-ignore:
      - main
jobs:
  ci-build:
    strategy:
      matrix:
        os: [ ubuntu-latest, windows-latest ]
        #os: [ ubuntu-latest, windows-latest, macos-latest ]
        java: [ 8, 11, 14 ]
    runs-on: ${{ matrix.os }}
    timeout-minutes: 20
    steps:
      - uses: actions/checkout@v2
        with:
          fetch-depth: 1
      - name: Set up JDK
        uses: actions/setup-java@v2.3.0
        with:
          distribution: 'zulu'
          java-version: ${{ matrix.java }}
          cache: 'gradle'
      - name: Login to Docker Hub
        uses: docker/login-action@v1
        with:
          username: ${{ secrets.DOCKERHUB_USERNAME }}
          password: ${{ secrets.DOCKERHUB_TOKEN }}
      - name: docker version
        run: docker version
      - name: docker info
        run: docker info
      - name: java version
        run: java -version
      - name: Debug
        run: ./gradlew checkDockerClient --info --stacktrace
      - name: clean build
        run: ./gradlew clean build --info --stacktrace
      - name: Publish Test Report
        if: ${{ always() }}
        uses: scacap/action-surefire-report@v1
        with:
          github_token: ${{ secrets.GITHUB_TOKEN }}
          report_paths: '**/build/test-results/test/TEST-*.xml'
...

Use authenticated access to the Docker Hub
Use authenticated access to the Docker Hub
