Daily Data Collection #6
This file contains 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
# 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 | |
- 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: 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 |