name: Check for Versioned Aliases

on:
  pull_request:
    branches:
      - master

jobs:
  validate-aliases:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout repository
        uses: actions/checkout@v3

      - name: Set up Python
        uses: actions/setup-python@v4
        with:
          python-version: '3.x'

      - name: Install dependencies
        run: pip install pyyaml

      - name: Fetch base branch for comparison
        run: git fetch origin ${{ github.base_ref }}

      - name: Run versioned alias check
        run: python3 .github/scripts/check_aliases.py
