Skip to content

[nabu] fix recursive call with software volume #398

[nabu] fix recursive call with software volume

[nabu] fix recursive call with software volume #398

Workflow file for this run

name: Build
on:
push:
branches:
- dev
pull_request:
workflow_dispatch:
release:
types: [published]
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
build-firmware:
name: Build Firmware
uses: esphome/workflows/.github/workflows/build.yml@main
with:
files: |
home-assistant-voice.factory.yaml
esphome-version: 2024.9.1
release-summary: ${{ github.event_name == 'release' && github.event.release.body || '' }}
release-url: ${{ github.event_name == 'release' && github.event.release.html_url || '' }}
release-version: ${{ github.event_name == 'release' && github.event.release.tag_name || '' }}
comment:
if: github.event_name == 'pull_request'
name: Comment on PR
runs-on: ubuntu-latest
needs:
- build-firmware
steps:
- name: Comment on PR
uses: actions/github-script@v7.0.1
with:
script: |-
const artifacts = await github.rest.actions.listWorkflowRunArtifacts({
owner: context.repo.owner,
repo: context.repo.repo,
run_id: context.runId,
})
const url = `https://github.com/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}/artifacts/${artifacts['data']['artifacts'][0]['id']}`
await github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `Firmware built successfully! :tada:
[Download][download] and extract the firmware to install with https://web.esphome.io
Make sure to choose \`home-assistant-voice-esp32s3.factory.bin\`.
[download]: ${url}`
})
upload:
if: github.event_name == 'release'
name: Upload to R2
needs:
- build-firmware
uses: esphome/workflows/.github/workflows/upload.yml@main
with:
directory: home-assistant-voice-pe
version: ${{ needs.build-firmware.outputs.version }}
channel: ${{ github.event.release.prerelease && 'beta' || 'production' }}
secrets: inherit