-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (43 loc) · 1.47 KB
/
daily-run.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# 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