esphome/.github/workflows/sync-device-classes.yml

49 lines
1.3 KiB
YAML
Raw Normal View History

---
name: Synchronise Device Classes from Home Assistant
on:
workflow_dispatch:
schedule:
2023-09-13 00:06:32 +02:00
- cron: "45 6 * * *"
jobs:
sync:
name: Sync Device Classes
runs-on: ubuntu-latest
2023-06-27 23:34:31 +02:00
if: github.repository == 'esphome/esphome'
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Checkout Home Assistant
uses: actions/checkout@v4.1.1
with:
repository: home-assistant/core
2023-03-29 03:02:34 +02:00
path: lib/home-assistant
- name: Setup Python
uses: actions/setup-python@v5.1.0
with:
python-version: 3.12
- name: Install Home Assistant
run: |
python -m pip install --upgrade pip
2023-03-29 03:02:34 +02:00
pip install -e lib/home-assistant
- name: Sync
run: |
python ./script/sync-device_class.py
- name: Commit changes
uses: peter-evans/create-pull-request@v6.0.4
with:
commit-message: "Synchronise Device Classes from Home Assistant"
committer: esphomebot <esphome@nabucasa.com>
author: esphomebot <esphome@nabucasa.com>
2023-05-16 01:30:25 +02:00
branch: sync/device-classes
delete-branch: true
title: "Synchronise Device Classes from Home Assistant"
2023-06-27 23:34:31 +02:00
body-path: .github/PULL_REQUEST_TEMPLATE.md
2023-05-16 01:30:25 +02:00
token: ${{ secrets.DEVICE_CLASS_SYNC_TOKEN }}