Adding repo secret for CI actions
Some checks failed
power-graph.yml / Adding repo secret for CI actions (push) Has been cancelled

This commit is contained in:
mrkmntal 2025-11-05 18:01:37 -05:00
commit e958a42bbc
2 changed files with 35 additions and 24 deletions

View file

@ -11,39 +11,25 @@ jobs:
plot:
runs-on: [self-hosted]
steps:
- name: Checkout repo
run: |
git clone https://mentalnet.xyz/forgejo/markmental/amd-telemetry.git .
echo "✅ Repository checked out"
- name: Check out repository
uses: https://data.forgejo.org/actions/checkout@v4
with:
token: ${{ secrets.PAT_READ_REPO }}
fetch-depth: 0
show-progress: true
- name: Install Python deps
- name: Install Python dependencies
run: |
sudo apt update
sudo apt install -y python3 python3-pip
pip install matplotlib pandas
pip3 install matplotlib pandas
- name: Generate power graph
run: |
python3 - <<'EOF'
import pandas as pd, matplotlib.pyplot as plt
df = pd.read_csv('power_log.csv', names=['time','apu','gpu','total'])
plt.figure(figsize=(10,5))
plt.plot(df['time'], df['apu'], label='APU Power (W)', color='orange')
plt.plot(df['time'], df['gpu'], label='GPU Power (W)', color='green')
plt.plot(df['time'], df['total'], label='Total (W)', color='blue', linewidth=1.5)
plt.xlabel('Time')
plt.ylabel('Watts')
plt.title('AMD TUF Power Log')
plt.legend()
plt.xticks(rotation=45)
plt.tight_layout()
plt.grid(True, alpha=0.3)
plt.savefig('power_graph.png', dpi=120)
print('✅ Graph generated: power_graph.png')
EOF
python3 plot_power.py # (script placed in your repo)
- name: Upload graph artifact
uses: actions/upload-artifact@v3
uses: https://data.forgejo.org/actions/upload-artifact@v3
with:
name: power-graph
path: power_graph.png