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

37 lines
874 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]
2025-11-05 18:17:37 -05:00
env:
BRANCH: ${{ github.ref_name }}
COMMIT: ${{ github.sha }}
2025-11-05 17:45:27 -05:00
steps:
2025-11-05 18:17:37 -05:00
- 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)"
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: |
apt update
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:17:37 -05:00
python3 plot_power.py
2025-11-05 17:45:27 -05:00
- name: Upload graph artifact
2025-11-05 18:17:37 -05:00
uses: actions/upload-artifact@v3
2025-11-05 17:45:27 -05:00
with:
name: power-graph
path: power_graph.png