Add file notification channel (#222)

* Add file notification channel

* Bypass file channel notifications for dockcheck.sh script

* Implement notification channel template reuse and advanced configuration variables.

* Fix text insertion formatting for dockcheck script and container updates.

* Fix dockcheck.sh notification csv and text output.

* Fix ntfy variable references and replace tr for uppercase conversion.

* Fix ALLOWEMPTY logic, undefined snippet case, and README formatting.

* Refactor notification send/skip logic. Adjust missing variable return codes.

* Adjust notifications README section for clarity and readability.

---------

Co-authored-by: Matthew Oleksowicz <matt@everyoneneeds.it>
This commit is contained in:
vorezal 2025-09-15 05:25:23 -04:00 committed by GitHub
parent 37f33d7a06
commit 31a45f1d84
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
18 changed files with 620 additions and 267 deletions

View file

@ -1,6 +1,6 @@
#!/usr/bin/env bash
VERSION="v0.7.0"
# ChangeNotes: Snooze bugfix, added auth support to ntfy.sh and sendmail support to SMTP
VERSION="v0.7.1"
# ChangeNotes: Add support for multiple notifications of the same type, output formatting, and file output
Github="https://github.com/mag37/dockcheck"
RawUrl="https://raw.githubusercontent.com/mag37/dockcheck/main/dockcheck.sh"
@ -507,6 +507,8 @@ if [[ -n ${GotUpdates[*]:-} ]]; then
if [[ -s "$ScriptWorkDir/urls.list" ]] && [[ "$PrintReleaseURL" == true ]]; then releasenotes; else Updates=("${GotUpdates[@]}"); fi
[[ "$AutoMode" == false ]] && list_options || printf "%s\n" "${Updates[@]}"
[[ "$Notify" == true ]] && { exec_if_exists_or_fail send_notification "${GotUpdates[@]}" || printf "\nCould not source notification function.\n"; }
else
[[ "$Notify" == true ]] && [[ ! -s "${ScriptWorkDir}/notify.sh" ]] && { exec_if_exists_or_fail send_notification "${GotUpdates[@]}" || printf "\nCould not source notification function.\n"; }
fi
# Optionally get updates if there's any