mirror of
https://github.com/esphome/esphome.git
synced 2025-01-18 18:35:59 +01:00
Update sync workflow (#5017)
This commit is contained in:
parent
bd9a4ff8de
commit
8f4abf6a63
1 changed files with 2 additions and 13 deletions
15
.github/workflows/sync-device-classes.yml
vendored
15
.github/workflows/sync-device-classes.yml
vendored
|
@ -6,14 +6,12 @@ on:
|
||||||
schedule:
|
schedule:
|
||||||
- cron: '45 6 * * *'
|
- cron: '45 6 * * *'
|
||||||
|
|
||||||
permissions:
|
|
||||||
contents: write
|
|
||||||
pull-requests: write
|
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync:
|
sync:
|
||||||
name: Sync Device Classes
|
name: Sync Device Classes
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
if: github.repository == 'esphome/esphome'
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout
|
- name: Checkout
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
@ -38,15 +36,6 @@ jobs:
|
||||||
run: |
|
run: |
|
||||||
python ./script/sync-device_class.py
|
python ./script/sync-device_class.py
|
||||||
|
|
||||||
- name: Get PR template
|
|
||||||
id: pr-template-body
|
|
||||||
run: |
|
|
||||||
body=$(cat .github/PULL_REQUEST_TEMPLATE.md)
|
|
||||||
delimiter="$(openssl rand -hex 8)"
|
|
||||||
echo "body<<$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
echo "$body" >> $GITHUB_OUTPUT
|
|
||||||
echo "$delimiter" >> $GITHUB_OUTPUT
|
|
||||||
|
|
||||||
- name: Commit changes
|
- name: Commit changes
|
||||||
uses: peter-evans/create-pull-request@v5
|
uses: peter-evans/create-pull-request@v5
|
||||||
with:
|
with:
|
||||||
|
@ -56,5 +45,5 @@ jobs:
|
||||||
branch: sync/device-classes
|
branch: sync/device-classes
|
||||||
delete-branch: true
|
delete-branch: true
|
||||||
title: "Synchronise Device Classes from Home Assistant"
|
title: "Synchronise Device Classes from Home Assistant"
|
||||||
body: ${{ steps.pr-template-body.outputs.body }}
|
body-path: .github/PULL_REQUEST_TEMPLATE.md
|
||||||
token: ${{ secrets.DEVICE_CLASS_SYNC_TOKEN }}
|
token: ${{ secrets.DEVICE_CLASS_SYNC_TOKEN }}
|
||||||
|
|
Loading…
Reference in a new issue