Check Generated Modules #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Check Generated Modules | |
on: | |
schedule: | |
- cron: '30 3 * * *' | |
jobs: | |
check-generated-modules: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: | |
- "3.11" | |
steps: | |
- uses: actions/checkout@v4.1.1 | |
with: | |
fetch-depth: 2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v5.0.0 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install 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/has-changes-action@v1.0.12 | |
- name: Create Pull Request | |
if: steps.changes.outputs.changed == 1 | |
uses: peter-evans/create-pull-request@v5.0.2 | |
with: | |
commit-message: "Update auto-generated constants" | |
delete-branch: true | |
title: "Update auto-generated constants" | |
labels: "ci-generated" |