Skip to content

WIP

WIP #2

---
name: Check mgmt assignments
on: [push, pull_request]
permissions:
contents: read
actions: read
jobs:
check-mgmt-assignments:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v5
with:
fetch-depth: 0
- name: Run mgmt assignments check
run: |
git fetch origin main
changed_files=$(git diff --name-only origin/main)
location_files=$(echo "$changed_files" | grep -E '^locations/.*\.yml$' || true)
if [ -z "$location_files" ]; then
echo "No location files changed, running against all locations"
python3 ./.github/checks/check-mgmt-assignments.py
else
python3 ./.github/checks/check-mgmt-assignments.py "$location_files"
fi