templates + arm64 build (slow)
This commit is contained in:
40
haven-notify/template/backup.tmpl
Normal file
40
haven-notify/template/backup.tmpl
Normal file
@@ -0,0 +1,40 @@
|
||||
{{/*
|
||||
Docker Backup Notification Template
|
||||
Variables expected:
|
||||
- .title: The backup title/name
|
||||
- .asset: The asset being backed up
|
||||
- .backupsizeinmb: The backup size in MB (will be formatted automatically)
|
||||
- .extra: Optional array of additional fields with .name and .value
|
||||
|
||||
Template Functions Available:
|
||||
- formatSize: Formats size in MB/GiB automatically
|
||||
*/}}
|
||||
{
|
||||
"embeds": [
|
||||
{
|
||||
"title": "📦 Docker Backup - {{.title}}",
|
||||
"description": "**{{.asset}}** has been backup-ed successfully! ✅🫡\n",
|
||||
"color": 3066993,
|
||||
"fields": [
|
||||
{
|
||||
"name": "💾 Backup Size",
|
||||
"value": "{{if .backupsizeinmb}}{{formatSize .backupsizeinmb}}{{else}}Unknown{{end}}",
|
||||
"inline": true
|
||||
}
|
||||
{{- if .extra}}
|
||||
{{- range $index, $field := .extra}},
|
||||
{
|
||||
"name": "{{$field.name}}",
|
||||
"value": "{{$field.value}}",
|
||||
"inline": true
|
||||
}
|
||||
{{- end}}
|
||||
{{- end}}
|
||||
],
|
||||
"footer": {
|
||||
"text": "✨ Haven Notify ✨"
|
||||
}{{if .timestamp}},
|
||||
"timestamp": "{{formatTime .timestamp}}"{{end}}
|
||||
}
|
||||
]
|
||||
}
|
Reference in New Issue
Block a user