name: Github workflows linter

on:
  pull_request:
    paths:
      - ".github/workflows/**"

jobs:
  lint-workflows:
    runs-on: ubuntu-slim
    steps:
      - name: Checkout
        uses: actions/checkout@v6

      - uses: actions/setup-go@v6
        with:
          go-version: ">=1.24.0"

      - name: Install actionlint
        run: go install github.com/rhysd/actionlint/cmd/actionlint@latest

      - name: Run actionlint
        env:
          SHELLCHECK_OPTS: --exclude=SC2102
        run: actionlint
