[CI] Trigger generic version notifier job on release (#12292)
This commit is contained in:
53
.github/workflows/release.yml
vendored
53
.github/workflows/release.yml
vendored
@@ -219,10 +219,19 @@ jobs:
|
|||||||
- init
|
- init
|
||||||
- deploy-manifest
|
- deploy-manifest
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate a token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.ESPHOME_GITHUB_APP_ID }}
|
||||||
|
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
|
||||||
|
owner: esphome
|
||||||
|
repositories: home-assistant-addon
|
||||||
|
|
||||||
- name: Trigger Workflow
|
- name: Trigger Workflow
|
||||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.DEPLOY_HA_ADDON_REPO_TOKEN }}
|
github-token: ${{ steps.generate-token.outputs.token }}
|
||||||
script: |
|
script: |
|
||||||
let description = "ESPHome";
|
let description = "ESPHome";
|
||||||
if (context.eventName == "release") {
|
if (context.eventName == "release") {
|
||||||
@@ -245,10 +254,19 @@ jobs:
|
|||||||
needs: [init]
|
needs: [init]
|
||||||
environment: ${{ needs.init.outputs.deploy_env }}
|
environment: ${{ needs.init.outputs.deploy_env }}
|
||||||
steps:
|
steps:
|
||||||
|
- name: Generate a token
|
||||||
|
id: generate-token
|
||||||
|
uses: actions/create-github-app-token@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.ESPHOME_GITHUB_APP_ID }}
|
||||||
|
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
|
||||||
|
owner: esphome
|
||||||
|
repositories: esphome-schema
|
||||||
|
|
||||||
- name: Trigger Workflow
|
- name: Trigger Workflow
|
||||||
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.DEPLOY_ESPHOME_SCHEMA_REPO_TOKEN }}
|
github-token: ${{ steps.generate-token.outputs.token }}
|
||||||
script: |
|
script: |
|
||||||
github.rest.actions.createWorkflowDispatch({
|
github.rest.actions.createWorkflowDispatch({
|
||||||
owner: "esphome",
|
owner: "esphome",
|
||||||
@@ -259,3 +277,34 @@ jobs:
|
|||||||
version: "${{ needs.init.outputs.tag }}",
|
version: "${{ needs.init.outputs.tag }}",
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
|
||||||
|
version-notifier:
|
||||||
|
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@7e473efe3cb98aa54f8d4bac15400b15fad77d94 # v2.2.0
|
||||||
|
with:
|
||||||
|
app-id: ${{ secrets.ESPHOME_GITHUB_APP_ID }}
|
||||||
|
private-key: ${{ secrets.ESPHOME_GITHUB_APP_PRIVATE_KEY }}
|
||||||
|
owner: esphome
|
||||||
|
repositories: version-notifier
|
||||||
|
|
||||||
|
- name: Trigger Workflow
|
||||||
|
uses: actions/github-script@ed597411d8f924073f98dfc5c65a23a2325f34cd # v8.0.0
|
||||||
|
with:
|
||||||
|
github-token: ${{ steps.generate-token.outputs.token }}
|
||||||
|
script: |
|
||||||
|
github.rest.actions.createWorkflowDispatch({
|
||||||
|
owner: "esphome",
|
||||||
|
repo: "version-notifier",
|
||||||
|
workflow_id: "notify.yml",
|
||||||
|
ref: "main",
|
||||||
|
inputs: {
|
||||||
|
version: "${{ needs.init.outputs.tag }}",
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user