Skip to content

Bump libraries

Bump libraries #450

Workflow file for this run

name: Ktlint
on:
pull_request:
workflow_dispatch:
jobs:
ktlint:
timeout-minutes: 5
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Setup Java
uses: actions/setup-java@v3
with:
distribution: 'corretto'
java-version: '17'
- name: Detect gradle version
uses: actions/github-script@v6
id: gradle-version-detector
with:
result-encoding: string
script: |
const scriptPath = '/./.github/scripts/gradle-version-detector.js'
const script = require(`${process.env.GITHUB_WORKSPACE}${scriptPath}`)
return script()
- name: Fetch gradle cache
uses: actions/cache@v3
with:
path: |
~/.gradle/caches
~/.gradle/wrapper
key: ${{ runner.os }}-${{ steps.gradle-version-detector.outputs.result }}
- name: Copy CI gradle.properties
run: mkdir -p ~/.gradle ; cp .github/ci-gradle.properties ~/.gradle/gradle.properties
- name: Make gradlew executable
run: chmod +x ./gradlew
- name: Run ktlint
run: ./gradlew ktlintCheck --continue
- name: 🐶 Setup Review Dog
if: ${{ failure() }}
uses: reviewdog/action-setup@v1
with:
reviewdog_version: latest
- name: 🐶 Report with Review Dog
if: ${{ failure() }}
env:
REVIEWDOG_GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
find . -path "*ktlint-report.xml" -type f | while read ktlintreport
do
echo Found ktlint report file: $ktlintreport
reviewdog -f=checkstyle -name=ktlint -filter-mode=nofilter -reporter=github-pr-review <$ktlintreport
done