Enforce TBD in Sports Data #18
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
| name: Enforce TBD in Sports Data | |
| on: | |
| schedule: | |
| - cron: '0 7 * * *' | |
| workflow_dispatch: | |
| jobs: | |
| enforce-tbd: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| token: ${{ secrets.PAT_TOKEN }} | |
| persist-credentials: true | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Run Fletcher Script | |
| run: node scripts/fletcher.js | |
| - name: Commit and Push | |
| env: | |
| REF_NAME: ${{ github.ref_name }} | |
| run: | | |
| git config --global user.name "DisabledAbel" | |
| git config --global user.email "196466003+DisabledAbel@users.noreply.github.com" | |
| git add lib/data/sports/*.json lib/data/sports/supplemental/*.json 2>/dev/null || true | |
| if git diff --cached --quiet; then | |
| echo "No changes to commit." | |
| exit 0 | |
| fi | |
| git commit -m "📅 Enforce TBD in sports data" | |
| git pull --rebase origin "$REF_NAME" | |
| git push origin HEAD:"$REF_NAME" |