Synchronise Device Classes from Home Assistant #462
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: Synchronise Device Classes from Home Assistant | |
on: | |
workflow_dispatch: | |
schedule: | |
- cron: "45 6 * * *" | |
jobs: | |
sync: | |
name: Sync Device Classes | |
runs-on: ubuntu-latest | |
if: github.repository == 'esphome/esphome' | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Checkout Home Assistant | |
uses: actions/[email protected] | |
with: | |
repository: home-assistant/core | |
path: lib/home-assistant | |
- name: Setup Python | |
uses: actions/[email protected] | |
with: | |
python-version: 3.12 | |
- name: Install Home Assistant | |
run: | | |
python -m pip install --upgrade pip | |
pip install -e lib/home-assistant | |
- name: Sync | |
run: | | |
python ./script/sync-device_class.py | |
- name: Commit changes | |
uses: peter-evans/[email protected] | |
with: | |
commit-message: "Synchronise Device Classes from Home Assistant" | |
committer: esphomebot <[email protected]> | |
author: esphomebot <[email protected]> | |
branch: sync/device-classes | |
delete-branch: true | |
title: "Synchronise Device Classes from Home Assistant" | |
body-path: .github/PULL_REQUEST_TEMPLATE.md | |
token: ${{ secrets.DEVICE_CLASS_SYNC_TOKEN }} |