mirror of
https://github.com/esphome/esphome.git
synced 2026-06-01 01:19:45 +08:00
[ci] Move ha-addon and schema release triggers to version-notifier (#16490)
This commit is contained in:
@@ -212,74 +212,6 @@ jobs:
|
|||||||
docker buildx imagetools create $(jq -Rcnr 'inputs | . / "," | map("-t " + .) | join(" ")' <<< "${{ steps.tags.outputs.tags}}") \
|
docker buildx imagetools create $(jq -Rcnr 'inputs | . / "," | map("-t " + .) | join(" ")' <<< "${{ steps.tags.outputs.tags}}") \
|
||||||
$(printf '${{ steps.tags.outputs.image }}@sha256:%s ' *)
|
$(printf '${{ steps.tags.outputs.image }}@sha256:%s ' *)
|
||||||
|
|
||||||
deploy-ha-addon-repo:
|
|
||||||
if: github.repository == 'esphome/esphome' && needs.init.outputs.branch_build == 'false'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs:
|
|
||||||
- init
|
|
||||||
- deploy-manifest
|
|
||||||
steps:
|
|
||||||
- name: Generate a token
|
|
||||||
id: generate-token
|
|
||||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
||||||
with:
|
|
||||||
client-id: ${{ vars.ESPHOME_GITHUB_APP_CLIENT_ID }}
|
|
||||||
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
|
|
||||||
owner: esphome
|
|
||||||
repositories: home-assistant-addon
|
|
||||||
permission-actions: write # actions.createWorkflowDispatch on the target repo (only API call made with this token)
|
|
||||||
|
|
||||||
- name: Trigger Workflow
|
|
||||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
||||||
with:
|
|
||||||
github-token: ${{ steps.generate-token.outputs.token }}
|
|
||||||
script: |
|
|
||||||
let description = "ESPHome";
|
|
||||||
if (context.eventName == "release") {
|
|
||||||
description = ${{ toJSON(github.event.release.body) }};
|
|
||||||
}
|
|
||||||
github.rest.actions.createWorkflowDispatch({
|
|
||||||
owner: "esphome",
|
|
||||||
repo: "home-assistant-addon",
|
|
||||||
workflow_id: "bump-version.yml",
|
|
||||||
ref: "main",
|
|
||||||
inputs: {
|
|
||||||
version: "${{ needs.init.outputs.tag }}",
|
|
||||||
content: description
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
deploy-esphome-schema:
|
|
||||||
if: github.repository == 'esphome/esphome' && needs.init.outputs.branch_build == 'false'
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
needs: [init]
|
|
||||||
environment: ${{ needs.init.outputs.deploy_env }}
|
|
||||||
steps:
|
|
||||||
- name: Generate a token
|
|
||||||
id: generate-token
|
|
||||||
uses: actions/create-github-app-token@bcd2ba49218906704ab6c1aa796996da409d3eb1 # v3.2.0
|
|
||||||
with:
|
|
||||||
client-id: ${{ vars.ESPHOME_GITHUB_APP_CLIENT_ID }}
|
|
||||||
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
|
|
||||||
owner: esphome
|
|
||||||
repositories: esphome-schema
|
|
||||||
permission-actions: write # actions.createWorkflowDispatch on the target repo (only API call made with this token)
|
|
||||||
|
|
||||||
- name: Trigger Workflow
|
|
||||||
uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0
|
|
||||||
with:
|
|
||||||
github-token: ${{ steps.generate-token.outputs.token }}
|
|
||||||
script: |
|
|
||||||
github.rest.actions.createWorkflowDispatch({
|
|
||||||
owner: "esphome",
|
|
||||||
repo: "esphome-schema",
|
|
||||||
workflow_id: "generate-schemas.yml",
|
|
||||||
ref: "main",
|
|
||||||
inputs: {
|
|
||||||
version: "${{ needs.init.outputs.tag }}",
|
|
||||||
}
|
|
||||||
})
|
|
||||||
|
|
||||||
version-notifier:
|
version-notifier:
|
||||||
if: github.repository == 'esphome/esphome' && needs.init.outputs.branch_build == 'false'
|
if: github.repository == 'esphome/esphome' && needs.init.outputs.branch_build == 'false'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@@ -302,7 +234,7 @@ jobs:
|
|||||||
with:
|
with:
|
||||||
github-token: ${{ steps.generate-token.outputs.token }}
|
github-token: ${{ steps.generate-token.outputs.token }}
|
||||||
script: |
|
script: |
|
||||||
github.rest.actions.createWorkflowDispatch({
|
await github.rest.actions.createWorkflowDispatch({
|
||||||
owner: "esphome",
|
owner: "esphome",
|
||||||
repo: "version-notifier",
|
repo: "version-notifier",
|
||||||
workflow_id: "notify.yml",
|
workflow_id: "notify.yml",
|
||||||
|
|||||||
Reference in New Issue
Block a user