Some checks failed
power-graph.yml / Adding repo secret for CI actions (push) Has been cancelled
36 lines
824 B
YAML
36 lines
824 B
YAML
name: Generate Power Graph
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
paths:
|
|
- power_log.csv
|
|
|
|
jobs:
|
|
plot:
|
|
runs-on: [self-hosted]
|
|
steps:
|
|
- 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 dependencies
|
|
run: |
|
|
sudo apt update
|
|
sudo apt install -y python3 python3-pip
|
|
pip3 install matplotlib pandas
|
|
|
|
- name: Generate power graph
|
|
run: |
|
|
python3 plot_power.py # (script placed in your repo)
|
|
|
|
- name: Upload graph artifact
|
|
uses: https://data.forgejo.org/actions/upload-artifact@v3
|
|
with:
|
|
name: power-graph
|
|
path: power_graph.png
|
|
|