Checks for pr "Linter setup test" by Xoka74 #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Checks for pr | |
run-name: Checks for pr "${{ github.event.pull_request.title }}" by ${{ github.actor }} | |
on: | |
pull_request: | |
# cancel previous running work flow on new one with same workflow name and pull_request_number | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
ktlint: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
curl -sSLO https://github.com/pinterest/ktlint/releases/download/1.2.1/ktlint && chmod a+x ktlint && sudo mv ktlint /usr/local/bin/ | |
- name: run ktlint | |
run: | | |
ktlint --reporter=checkstyle,output=build/ktlint-report.xml | |
continue-on-error: true | |
- uses: yutailang0119/action-ktlint@v4 | |
with: | |
report-path: build/*.xml # Support glob patterns by https://www.npmjs.com/package/@actions/glob | |
ignore-warnings: true # Ignore Lint Warnings | |
continue-on-error: false # If annotations contain error of severity, action-ktlint exit 1. |