Bypass LFS hook in pr_creator git commands #4
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Weekly Google Fonts Upstream Auto-Updater Workflow (Internal Engine) | |
| name: Weekly Font Upstream Auto-Updater | |
| on: | |
| push: | |
| branches: [auto_updater] | |
| schedule: | |
| - cron: '0 0 * * 0' # Runs weekly every Sunday at 00:00 UTC | |
| workflow_dispatch: | |
| inputs: | |
| target_family: | |
| description: 'Path to single METADATA.pb file (optional, e.g., ofl/inter/METADATA.pb)' | |
| required: false | |
| default: '' | |
| max_families: | |
| description: 'Maximum number of families to audit' | |
| required: false | |
| default: '2000' | |
| max_workers: | |
| description: 'Parallel worker threads' | |
| required: false | |
| default: '10' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| issues: write | |
| jobs: | |
| autoupdate-sweep: | |
| name: Run Upstream Auto-Update Catalog Audit | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout google/fonts Repository | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 1 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Cache State Database | |
| uses: actions/cache@v3 | |
| with: | |
| path: gf_autoupdater_state.db | |
| key: gf-autoupdater-state-${{ github.run_id }} | |
| restore-keys: | | |
| gf-autoupdater-state- | |
| - name: Install Engine Dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install fontTools requests | |
| - name: Run Upstream Update Audit Sweep | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: | | |
| TARGET_FAMILY="${{ github.event.inputs.target_family }}" | |
| MAX_FAMILIES="${{ github.event.inputs.max_families || '2000' }}" | |
| MAX_WORKERS="${{ github.event.inputs.max_workers || '10' }}" | |
| if [ -n "$TARGET_FAMILY" ]; then | |
| echo "Running targeted update check on: $TARGET_FAMILY" | |
| PYTHONPATH=.ci python3 -m autoupdater.cli --metadata "$TARGET_FAMILY" | |
| else | |
| echo "Running full catalog update audit across $MAX_FAMILIES families ($MAX_WORKERS workers)..." | |
| PYTHONPATH=.ci python3 .ci/autoupdater/catalog_audit.py . "$MAX_FAMILIES" "$MAX_WORKERS" | |
| fi | |
| - name: Publish Step Summary Report | |
| if: always() | |
| run: | | |
| if [ -f catalog_audit_report.md ]; then | |
| cat catalog_audit_report.md >> $GITHUB_STEP_SUMMARY | |
| fi | |
| - name: Upload Human-Readable Audit Artifacts | |
| if: always() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: autoupdater-human-readable-report | |
| path: | | |
| catalog_audit_report.md | |
| catalog_audit_report.csv | |
| catalog_audit_report.json | |
| gf_audit_progress.json | |
| gf_catalog_full_audit.db |