summaryrefslogtreecommitdiff
path: root/.github/workflows/tflint.yaml
blob: 3ddb840a966a344f3abcb8aadad61be5a88bbea8 (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: tflint

on:
  push:
    branches: [ main ]
  pull_request:
  workflow_dispatch:

jobs:
  scan:
    name: Scan

    runs-on: ubuntu-latest

    permissions:
      security-events: write

    steps:
      - name: Checkout repository
        uses: actions/checkout@v4

      - name: Install Nix
        uses: cachix/install-nix-action@v30

      - name: Build tflint report
        id: tflint-run
        run: |
          echo "sarif-file=$(nix build --no-link --print-build-logs --print-out-paths .#tflint)" >> "$GITHUB_OUTPUT"

      - name: Upload results
        uses: github/codeql-action/upload-sarif@v3
        with:
          sarif_file: ${{ steps.tflint-run.outputs.sarif-file }}
          wait-for-processing: true