From 19fb45bcb3656ceac9d1fcadeda2b8ccd988aa1a Mon Sep 17 00:00:00 2001 From: Jesse Hills <3060199+jesserockz@users.noreply.github.com> Date: Wed, 16 Feb 2022 21:46:22 +1300 Subject: [PATCH] Update community release workflows --- .github/workflows/bump-version.yml | 44 ++++++++++++++---------- .github/workflows/deploy-community.yml | 46 ++++++++++++++++---------- 2 files changed, 55 insertions(+), 35 deletions(-) diff --git a/.github/workflows/bump-version.yml b/.github/workflows/bump-version.yml index 4db36ff..6414519 100644 --- a/.github/workflows/bump-version.yml +++ b/.github/workflows/bump-version.yml @@ -57,20 +57,30 @@ jobs: runs-on: ubuntu-latest needs: [create-release] steps: - - name: Publish beta release to community-addons repository - run: | - docker run --rm hassioaddons/repository-updater:latest \ - --repository hassio-addons/repository-beta \ - --addon esphome \ - --token "${TOKEN}" - env: - TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }} - - if: ${{ !contains(github.event.inputs.version, 'b') }} - name: Publish stable release to community-addons repository - run: | - docker run --rm hassioaddons/repository-updater:latest \ - --repository hassio-addons/repository \ - --addon esphome \ - --token "${TOKEN}" - env: - TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }} + - 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 }}" + } diff --git a/.github/workflows/deploy-community.yml b/.github/workflows/deploy-community.yml index 5d438d8..847b071 100644 --- a/.github/workflows/deploy-community.yml +++ b/.github/workflows/deploy-community.yml @@ -16,21 +16,31 @@ jobs: deploy-community-addons: runs-on: ubuntu-latest steps: - - if: ${{ contains(github.event.inputs.version, 'b') || github.event.inputs.beta == 'true' }} - name: Publish beta release to community-addons repository - run: | - docker run --rm hassioaddons/repository-updater:latest \ - --repository hassio-addons/repository-beta \ - --addon esphome \ - --token "${TOKEN}" - env: - TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }} - - if: ${{ !contains(github.event.inputs.version, 'b') }} - name: Publish stable release to community-addons repository - run: | - docker run --rm hassioaddons/repository-updater:latest \ - --repository hassio-addons/repository \ - --addon esphome \ - --token "${TOKEN}" - env: - TOKEN: ${{ secrets.COMMUNITY_ADDONS_TOKEN }} + - 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 }}" + }