latest-hourly #4356
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: latest-hourly | |
| on: | |
| workflow_dispatch: {} | |
| schedule: | |
| - cron: "5 * * * *" # every hour at :05 UTC | |
| # serialize with daily job to avoid push races | |
| concurrency: | |
| group: data-writes | |
| cancel-in-progress: true | |
| permissions: | |
| contents: write | |
| jobs: | |
| latest: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 20 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install deps | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Compute UTC date | |
| id: utc | |
| run: echo "today=$(date -u +%F)" >> "$GITHUB_OUTPUT" | |
| # NOTE: requires orchestrate to support --mode latest (latest-only publish) | |
| - name: Run orchestrator (latest-only) | |
| run: python -m src.orchestrate --date "${{ steps.utc.outputs.today }}" --mode latest | |
| - name: Commit latest changes | |
| run: | | |
| git config user.name "gh-actions" | |
| git config user.email "actions@users.noreply.github.com" | |
| git add data/latest/** symbol_registry/** || true | |
| if git diff --staged --quiet; then | |
| echo "No changes to commit." | |
| else | |
| git commit -m "data: latest refresh ${{ steps.utc.outputs.today }}" | |
| git push | |
| fi |