2022-02-10 20:11:27 +01:00
|
|
|
name: Update Community Repo
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
inputs:
|
|
|
|
version:
|
|
|
|
description: The version to release
|
|
|
|
required: true
|
|
|
|
beta:
|
|
|
|
description: Whether to release a beta version
|
2022-02-10 20:15:36 +01:00
|
|
|
type: boolean
|
2022-02-10 20:11:27 +01:00
|
|
|
required: false
|
|
|
|
default: false
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy-community-addons:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
2022-02-16 09:46:22 +01:00
|
|
|
- if: ${{ contains(github.event.inputs.version, 'b') || github.event.inputs.beta == 'true' }}
|
|
|
|
name: Publish beta release to community-addons repository
|
|
|
|
uses: peter-evans/repository-dispatch@v1.1.3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.COMMUNITY_ADDONS_TOKEN }}
|
|
|
|
repository: hassio-addons/repository-beta
|
|
|
|
event-type: update
|
|
|
|
client-payload: >
|
|
|
|
{
|
|
|
|
"addon": "esphome",
|
|
|
|
"name": "ESPHome",
|
|
|
|
"repository": "esphome/home-assistant-addon",
|
|
|
|
"version": "${{ github.event.inputs.version }}"
|
|
|
|
}
|
|
|
|
- if: ${{ !contains(github.event.inputs.version, 'b') }}
|
|
|
|
name: Publish stable release to community-addons repository
|
|
|
|
uses: peter-evans/repository-dispatch@v1.1.3
|
|
|
|
with:
|
|
|
|
token: ${{ secrets.COMMUNITY_ADDONS_TOKEN }}
|
|
|
|
repository: hassio-addons/repository
|
|
|
|
event-type: update
|
|
|
|
client-payload: >
|
|
|
|
{
|
|
|
|
"addon": "esphome",
|
|
|
|
"name": "ESPHome",
|
|
|
|
"repository": "esphome/home-assistant-addon",
|
|
|
|
"version": "${{ github.event.inputs.version }}"
|
|
|
|
}
|