name: CI
on:
  push:
    branches:
      - main
  pull_request: {}
jobs:
  checks:
    name: checks
    runs-on: ubuntu-latest
    steps:
      # the skip-duplicate-actions step actually applies to the whole workflow
      - uses: fkirc/skip-duplicate-actions@master
        name: cancel previous runs
        with:
          github_token: ${{ github.token }}
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0 #for spotless ratchet
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - uses: eskatos/gradle-command-action@v1
        name: license header
        with:
          arguments: spotlessCheck -PspotlessFrom=origin/${{ github.base_ref }}
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true
      - uses: eskatos/gradle-command-action@v1
        name: tests
        with:
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true
name: CI
on:
  push:
    branches:
      - main
  pull_request: {}
jobs:
  checks:
    name: checks
    runs-on: ubuntu-latest
    steps:
      # the skip-duplicate-actions step actually applies to the whole workflow
      - uses: fkirc/skip-duplicate-actions@master
        name: cancel previous runs
        with:
          github_token: ${{ github.token }}
      - uses: actions/checkout@v2
        with:
          fetch-depth: 0 #for spotless ratchet
      - uses: actions/setup-java@v1
        with:
          java-version: 8
      - uses: eskatos/gradle-command-action@v1
        name: license header
        if: ${{ github.event_name == 'pull_request' }}
        with:
          arguments: spotlessCheck -PspotlessFrom=origin/${{ github.base_ref }}
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true
      - uses: eskatos/gradle-command-action@v1
        name: tests
        with:
          wrapper-cache-enabled: true
          dependencies-cache-enabled: true
          configuration-cache-enabled: true
Apply spotless in CI only for pull_request events
[polish] Apply spotless in CI only for pull_request events
