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
2023-09-13 00:06:32 +02:00
uses: actions/checkout@v4.0.0
- name: Checkout Home Assistant
2023-09-13 00:06:32 +02:00
uses: actions/checkout@v4.0.0
with:
repository: home-assistant/core
2023-03-29 03:02:34 +02:00
path: lib/home-assistant
- name: Setup Python
2023-09-13 00:06:32 +02:00
uses: actions/setup-python@v4.7.0
with:
python-version: 3.11
- 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
2023-09-13 00:06:32 +02:00
uses: peter-evans/create-pull-request@v5.0.2
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 }}