aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/detekt_beta.yml
blob: cd8e38cc5dfd741ebfef7a1cafce790598594f86 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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