-
Notifications
You must be signed in to change notification settings - Fork 21
52 lines (49 loc) · 1.51 KB
/
check-generated-modules.yml
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
name: Check Generated Modules
on:
schedule:
- cron: '30 3 15 * *'
jobs:
check-generated-modules:
runs-on: ubuntu-latest
strategy:
matrix:
python-version:
- "3.12"
node-version:
- "20"
steps:
- uses: actions/[email protected]
with:
fetch-depth: 2
- name: Set up Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- name: Generate registry JSON files
run: |
npm install
npm run generate
- name: Set up Python ${{ matrix.python-version }}
uses: actions/[email protected]
with:
python-version: ${{ matrix.python-version }}
- name: Install Python scripts dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements_scripts.txt
- name: Run scripts
run: |
python ./scripts/generate_multilevel_sensor_constants.py
python ./scripts/generate_notification_constants.py
- name: Check for changes
id: changes
uses: UnicornGlobal/[email protected]
- name: Create Pull Request
if: steps.changes.outputs.changed == 1
uses: peter-evans/[email protected]
with:
commit-message: "Update auto-generated constants"
delete-branch: true
title: "Update auto-generated constants"
labels: "ci-generated"