name: Check Large Files

on:
  pull_request:
  push:
    branches: [main]

jobs:
  check-large-files:
    name: Check for large files
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Check for large files
        run: |
          find . -type f -size +5M | while read file; do
            echo "::error file=${file}::File ${file} is larger than 5MB"
          done
