amd-monitor/.forgejo/workflows/power-graph.yml

36 lines
824 B
YAML
Raw Normal View History

2025-11-05 17:45:27 -05:00
name: Generate Power Graph
on:
push:
branches:
2025-11-05 17:46:28 -05:00
- master
2025-11-05 17:45:27 -05:00
paths:
- power_log.csv
jobs:
plot:
runs-on: [self-hosted]
steps:
2025-11-05 18:01:37 -05:00
- name: Check out repository
uses: https://data.forgejo.org/actions/checkout@v4
with:
token: ${{ secrets.PAT_READ_REPO }}
fetch-depth: 0
show-progress: true
2025-11-05 17:45:27 -05:00
2025-11-05 18:01:37 -05:00
- name: Install Python dependencies
2025-11-05 17:45:27 -05:00
run: |
sudo apt update
sudo apt install -y python3 python3-pip
2025-11-05 18:01:37 -05:00
pip3 install matplotlib pandas
2025-11-05 17:45:27 -05:00
- name: Generate power graph
run: |
2025-11-05 18:01:37 -05:00
python3 plot_power.py # (script placed in your repo)
2025-11-05 17:45:27 -05:00
- name: Upload graph artifact
2025-11-05 18:01:37 -05:00
uses: https://data.forgejo.org/actions/upload-artifact@v3
2025-11-05 17:45:27 -05:00
with:
name: power-graph
path: power_graph.png