Orchestrator Auto #10
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: Orchestrator Auto | |
| on: | |
| workflow_dispatch: | |
| schedule: | |
| - cron: "17 8 * * *" # 08:17 UTC daily (03:17 America/Detroit) - auto mode | |
| - cron: "47 20 * * *" # 20:47 UTC daily (15:47 America/Detroit) - auto mode | |
| permissions: | |
| contents: write | |
| concurrency: | |
| group: ${{ github.workflow }} | |
| cancel-in-progress: true | |
| jobs: | |
| run: | |
| runs-on: ubuntu-latest-arm64 | |
| timeout-minutes: 60 | |
| container: | |
| image: mcr.microsoft.com/playwright:v1.55.0-noble-arm64 | |
| steps: | |
| - uses: actions/checkout@v4 # v4.3.0 | |
| - uses: pnpm/action-setup@v4 # v4.1.0 | |
| - uses: actions/setup-node@v4 # v4.4.0 | |
| with: | |
| node-version: 22 | |
| cache: 'pnpm' | |
| - run: pnpm install --frozen-lockfile | |
| - name: Run orchestrator | |
| env: | |
| DATA_ROOT: ${{ github.workspace }}/data | |
| ORCH_CONCURRENCY: 2 | |
| ORCH_RETRIES: 2 | |
| run: | | |
| node orchestrate.js run auto | |
| - name: Commit scraped data | |
| if: success() | |
| run: | | |
| # Configure git for VERIFIED commits | |
| git config --global user.name "github-actions[bot]" | |
| git config --global user.email "github-actions[bot]@users.noreply.github.com" | |
| # Switch to data branch (create if doesn't exist) | |
| git fetch origin data:data 2>/dev/null || git checkout -b data | |
| git checkout data | |
| # Add and commit data | |
| git add -f data/ | |
| if git diff --staged --quiet; then | |
| echo "No data changes to commit" | |
| else | |
| git commit -m "🤖 Auto-scrape $(date -u '+%Y-%m-%d %H:%M UTC') | |
| Orchestration ID: $(cat data/orchestrations/*/*/manifest.json | jq -r '.orchestration.id' | tail -1) | |
| 🤖 Generated with GitHub Actions | |
| Co-Authored-By: github-actions[bot] <github-actions[bot]@users.noreply.github.com>" | |
| # Push to data branch | |
| git push -u origin data | |
| fi |