name: CI

on:
  push:
    paths:
      - ".github/workflows/**"
    branches:
      - main
      - 3.x
  pull_request:
    paths:
      - ".github/workflows/**"
    branches:
      - main
      - 3.x
      - "!v[0-9]*"

permissions:
  contents: read

jobs:
  lint-workflows:
    runs-on: ubuntu-latest

    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
      # From https://github.com/rhysd/actionlint/blob/main/docs/usage.md#use-actionlint-on-github-actions
      - name: Check workflow files
        uses: docker://rhysd/actionlint:1.7.4@sha256:82244e1db1c60d82c7792180a48dd0bcb838370bb589d53ff132503fc9485868
        with:
          args: -color
