-
Notifications
You must be signed in to change notification settings - Fork 0
61 lines (48 loc) · 1.53 KB
/
update-data.yml
File metadata and controls
61 lines (48 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
name: Update datasets
on:
schedule:
# 1st of every month at 06:00 UTC
- cron: '0 6 1 * *'
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
update-data:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- uses: astral-sh/setup-uv@v4
- name: Install dependencies
run: uv sync
- name: Install Playwright browsers
run: uv run python -m playwright install --with-deps
- name: Collect all datasets
run: uv run codecarbon-data collect all --log-level INFO
- name: Validate datasets
run: uv run codecarbon-data validate all
- name: Create pull request
uses: peter-evans/create-pull-request@v7
with:
add-paths: |
data/
ATTRIBUTION.md
branch: auto/data-update-${{ github.run_id }}
commit-message: 'chore: update datasets — ${{ github.event.repository.updated_at }}'
title: 'chore: update datasets — ${{ github.run_id }}'
body: |
Automated monthly data refresh.
**Changed files:**
- `data/hardware_gpu.csv`
- `data/hardware_cpu.csv`
- `data/grid_emissions.csv`
- `data/cloud_emissions.csv`
- `data/embodied_carbon.csv`
- `ATTRIBUTION.md`
Triggered by: `${{ github.event_name }}`
labels: |
data-update
automated