Skip to content

Daily Data Collection #8

Daily Data Collection

Daily Data Collection #8

Workflow file for this run

# SPDX-FileCopyrightText: 2025 Joost van der Laan <[email protected]>
#
# SPDX-License-Identifier: AGPL-3.0-only
name: Daily Data Collection
on:
schedule:
# Run at 00:00 UTC every day
- cron: '0 0 * * *'
# Allow manual trigger
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
# Add your environment variables here
FINANCIALMODELINGPREP_API_KEY: ${{ secrets.FINANCIALMODELINGPREP_API_KEY }}
POLYGON_API_KEY: ${{ secrets.POLYGON_API_KEY }}
jobs:
collect-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Nix Flake Checker
uses: DeterminateSystems/flake-checker-action@v9
- uses: cachix/install-nix-action@v24
with:
install_url: https://github.com/numtide/nix-unstable-installer/releases/download/nix-2.10.0pre20220629_b7eb4ac/install
nix_path: nixpkgs=channel:nixos-24.11
extra_nix_config: |
experimental-features = nix-command flakes
- uses: DeterminateSystems/magic-nix-cache-action@main
- name: Update flake.lock
uses: DeterminateSystems/update-flake-lock@main
with:
pr-title: "Update flake.lock" # Title of PR to be created
pr-labels: | # Labels to be set on the PR
dependencies
automated
- uses: cachix/cachix-action@v13
with:
name: fashionunited
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build and run data collection
run: |
nix \
--extra-experimental-features "nix-command flakes" \
develop \
--command bash -c "cargo build --release && ./target/release/top200-rs export-combined"
- name: Upload CSV artifact
uses: actions/upload-artifact@v4
with:
name: market-data-${{ github.run_number }}
path: |
output/*.csv
retention-days: 90