feat(deploy): founder push notifications on deploys [#734]

Also first live E2E of the gitea webhook: this push triggers the
pull + reload_all path with no core restart.
Detail: https://projects.knownelement.com/issues/734
This commit is contained in:
2026-09-02 22:09:28 -05:00
parent d08f3131f0
commit 10f9d2d02d
+30 -6
View File
@@ -224,7 +224,6 @@
title: TEMP RISING FAST title: TEMP RISING FAST
message: '{{ trigger.entity_id }} climbing ~10F/15min — check cooling message: '{{ trigger.entity_id }} climbing ~10F/15min — check cooling
before the 104F threshold. (rate-of-change early warning)' before the 104F threshold. (rate-of-change early warning)'
mode: single
# Deploy pipeline [#734]: gitea repo webhook (master pushes) -> forced pull # Deploy pipeline [#734]: gitea repo webhook (master pushes) -> forced pull
# -> minimal reload. Core restarts ONLY when configuration.yaml or a # -> minimal reload. Core restarts ONLY when configuration.yaml or a
# packages platform-sensor file changed; everything else reloads with no # packages platform-sensor file changed; everything else reloads with no
@@ -258,13 +257,22 @@
+ (trigger.json.commits | default([]) | map(attribute='modified') | flatten | list) }} + (trigger.json.commits | default([]) | map(attribute='modified') | flatten | list) }}
need_restart: >- need_restart: >-
{{ changed_files | select('in', ['configuration.yaml', 'packages/plant_snmp.yaml']) | list | count > 0 }} {{ changed_files | select('in', ['configuration.yaml', 'packages/plant_snmp.yaml']) | list | count > 0 }}
push_message: >-
Git push ({{ trigger.json.sender.login | default('unknown') }}):
{{ trigger.json.commits | default([]) | map(attribute='message') | join(' | ') | truncate(120) }}.
{{ 'Core restart required' if need_restart else 'Reload only - no core restart' }}.
- action: persistent_notification.create - action: persistent_notification.create
data: data:
title: Deploy started title: Deploy started
message: >- message: "{{ push_message }} Pulling now."
Git push ({{ trigger.json.sender.login | default('unknown') }}): - action: notify.send_message
{{ trigger.json.commits | default([]) | map(attribute='message') | join(' | ') | truncate(160) }}. target:
Pulling now - {{ 'core restart required' if need_restart else 'reload only, no restart' }}. entity_id:
- notify.ultix_sidecar_new
- notify.allthes_ipad
data:
title: PFV deploy started
message: "{{ push_message }}"
- action: hassio.addon_restart - action: hassio.addon_restart
data: data:
addon: core_git_pull addon: core_git_pull
@@ -280,6 +288,14 @@
data: data:
title: Deploy - restarting core title: Deploy - restarting core
message: "Pull done; restarting core for {{ changed_files | join(', ') }}. Back in ~1 min." message: "Pull done; restarting core for {{ changed_files | join(', ') }}. Back in ~1 min."
- action: notify.send_message
target:
entity_id:
- notify.ultix_sidecar_new
- notify.allthes_ipad
data:
title: PFV deploy - core restarting
message: "Pull done; restarting core for {{ changed_files | join(', ') }}."
- delay: - delay:
hours: 0 hours: 0
minutes: 0 minutes: 0
@@ -290,4 +306,12 @@
- action: persistent_notification.create - action: persistent_notification.create
data: data:
title: Deploy complete title: Deploy complete
message: "Pulled + reloaded YAML config at {{ now().strftime('%H:%M:%S') }} (no core restart). Files: {{ changed_files | join(', ') | truncate(200) }}" message: "Pulled + reloaded YAML config at {{ now().strftime('%H:%M:%S') }} (no core restart). Files: {{ changed_files | join(', ') | truncate(180) }}"
- action: notify.send_message
target:
entity_id:
- notify.ultix_sidecar_new
- notify.allthes_ipad
data:
title: PFV deploy complete
message: "Pulled + reloaded YAML at {{ now().strftime('%H:%M:%S') }} - no core restart. Files: {{ changed_files | join(', ') | truncate(120) }}"