forked from iterativv/NostalgiaForInfinity
-
Notifications
You must be signed in to change notification settings - Fork 0
48 lines (44 loc) · 1.46 KB
/
build-data.yml
File metadata and controls
48 lines (44 loc) · 1.46 KB
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
name: Build Data Image
on:
schedule:
- cron: '0 0 3 * *' # Runs at 00:00 UTC on the 3rd day of each month
workflow_dispatch:
jobs:
# Download market data in parallel
build-data-image:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
EXCHANGE: [binance, kucoin]
TRADING_MODE: [spot, futures]
exclude:
- EXCHANGE: kucoin
TRADING_MODE: futures
steps:
- uses: actions/checkout@v5
- name: Fetch data for backtests
env:
EXCHANGE: ${{ matrix.EXCHANGE }}
TRADING_MODE: ${{ matrix.TRADING_MODE }}
TIMEFRAME: 5m
TIMERANGE: 20240101-20250701
HELPER_TIME_FRAMES: 5m 15m 1h 4h 8h 1d
run: |
mkdir -p user_data/data
.github/workflows/scripts/download-necessary-exchange-market-data-for-backtests.sh
- name: Log in to GHCR
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image with data
run: |
docker build -t ghcr.io/${{ github.actor }}/market-data:${{ matrix.EXCHANGE }}-${{ matrix.TRADING_MODE }} . -f- <<EOF
FROM ubuntu:22.04
COPY user_data/data /data
EOF
- name: Push data image
run: |
docker push ghcr.io/${{ github.actor }}/market-data:${{ matrix.EXCHANGE }}-${{ matrix.TRADING_MODE }}