name: App / Lint

on:
  push:
    branches:
      - master
      - release-*
  pull_request:

permissions:
  contents: read
  security-events: write

jobs:
  lint:
    name: Lint
    runs-on: ubuntu-24.04
    steps:
      - name: Checkout repository
        uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
      - name: Setup Java
        uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0
        with:
          distribution: temurin
          java-version-file: .tools-versions
      - name: Setup Gradle
        uses: gradle/actions/setup-gradle@0723195856401067f7a2779048b490ace7a47d7c # v5.0.2
      - name: Run detekt and lint tasks
        run: ./gradlew detekt lint
      - name: Upload SARIF files
        uses: github/codeql-action/upload-sarif@c10b8064de6f491fea524254123dbe5e09572f13 # v4.35.1
        if: ${{ always() }}
        with:
          sarif_file: .
