Skip to content

fix pr-check action not commenting #3

fix pr-check action not commenting

fix pr-check action not commenting #3

Workflow file for this run

name: Run detekt on push
on:
push:
branches:
- "beta"
paths-ignore:
- ".gitignore"
jobs:
detekt:
name: Run detekt
runs-on: ubuntu-latest
permissions:
contents: read
steps:
- name: Checkout PR code
uses: actions/checkout@v4
- uses: ./.github/actions/setup-normal-workspace
- name: Run detekt main (w/ typing analysis)
run: |
./gradlew detektMain --stacktrace
- name: Check if SARIF file exists
id: check_sarif
run: |
if [ -f "versions/1.8.9/build/reports/detekt/main.sarif" ]; then
echo "exists=true" >> $GITHUB_OUTPUT
else
echo "exists=false" >> $GITHUB_OUTPUT
fi
- name: Annotate detekt failures
if: ${{ !cancelled() && steps.check_sarif.outputs.exists == 'true' }}
run: |
chmod +x .github/scripts/process_detekt_sarif.sh
./.github/scripts/process_detekt_sarif.sh versions/1.8.9/build/reports/detekt/main.sarif