name: GitHub Actions Lint

permissions: {}

on:
  pull_request:
    paths:
      - ".github/**"
  push:
    branches:
      - main
    paths:
      - ".github/**"

concurrency:
  group: ${{ github.workflow }}-${{ github.ref }}
  cancel-in-progress: true

jobs:
  actionlint:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          persist-credentials: false
      - uses: koki-develop/github-actions-lint/actionlint@79e44f1c8de97bff90f5bf8497a8b2af1f66193c # v1.2.0

  ghalint:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          persist-credentials: false
      - uses: koki-develop/github-actions-lint/ghalint@79e44f1c8de97bff90f5bf8497a8b2af1f66193c # v1.2.0
        with:
          action-path: ./.github/actions/**/action.yml

  zizmor:
    timeout-minutes: 5
    runs-on: ubuntu-latest
    permissions:
      contents: read
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
        with:
          persist-credentials: false
      - uses: koki-develop/github-actions-lint/zizmor@79e44f1c8de97bff90f5bf8497a8b2af1f66193c # v1.2.0
        with:
          github-token: ${{ github.token }}
          persona: auditor
