Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions .github/workflows/run-rs-daily.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: Run Relative Strength Daily

on:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
workflow_dispatch: # Allows manual trigger

jobs:
run-scripts:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12' # Matches the repo's Python version

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run scripts
run: |
python rs_data.py # Aggregates price data
python rs_ranking.py # Calculates rankings
# Alternatively, if you prefer the all-in-one: python relative-strength.py

- name: Commit and push outputs
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add output/*
git commit -m "Update RS outputs from daily run" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
45 changes: 45 additions & 0 deletions .github/workflows/run-rs-daily2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: Run Relative Strength Daily

on:
schedule:
- cron: '0 0 * * *' # Daily at midnight UTC
workflow_dispatch: # Allows manual trigger

jobs:
run-scripts:
runs-on: ubuntu-latest

steps:
- name: Checkout repo
uses: actions/checkout@v4

- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Verify requirements
run: |
ls -l requirements.txt || echo "requirements.txt not found"
cat requirements.txt || echo "Failed to read requirements.txt"

- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt

- name: Run scripts
run: |
python rs_data.py
python rs_ranking.py
# Alternatively: python relative-strength.py

- name: Commit and push outputs
run: |
git config --global user.name "GitHub Actions"
git config --global user.email "actions@github.com"
git add output/*
git commit -m "Update RS outputs from daily run" || echo "No changes to commit"
git push
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}