# =================================
# Copyright: CEA-LIST/DIASI/SIALV
# Author : pixano@cea.fr
# License: CECILL-C
# =================================

name: Check License Header

on:
  push:
    branches:
      - "main"
  pull_request:
    branches:
      - "main"

jobs:
  check_license_header:
    runs-on: ubuntu-latest

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

      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.12"
          cache: "pip"

      - name: Install dependencies
        run: pip install pyyaml

      - name: Run license header check
        run: python check_license_header.py
