amd-monitor/.forgejo/workflows/power-graph.yml
mrkmntal 619524c75e
Some checks failed
Generate Power Graph / plot (push) Failing after 2m27s
Fix venv requirement of power graph action/power update
2025-11-05 18:26:17 -05:00

39 lines
1,008 B
YAML

name: Generate Power Graph
on:
push:
branches: [ master ]
paths: [ power_log.csv ]
jobs:
plot:
runs-on: [self-hosted]
env:
BRANCH: ${{ github.ref_name }}
COMMIT: ${{ github.sha }}
steps:
- name: Clone repository manually
run: |
git clone --branch "$BRANCH" https://${{ secrets.PAT_READ_REPO }}@mentalnet.xyz/forgejo/markmental/amd-monitor.git .
echo "✅ Checked out branch $BRANCH ($COMMIT)"
- name: Install Python and deps (venv)
run: |
apt-get update
apt-get install -y python3-full python3-venv
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install matplotlib pandas
- name: Generate power graph
run: |
. venv/bin/activate
python plot_power.py
- name: Upload graph artifact
uses: actions/upload-artifact@v3
with:
name: power-graph
path: power_graph.png