From 24c5bf0eb74769e4a22f508e8f749606689c8e4f Mon Sep 17 00:00:00 2001 From: Alex Frantz Date: Fri, 24 Apr 2026 15:46:08 -0400 Subject: [PATCH] fawk --- scripts/run_updates.py | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/scripts/run_updates.py b/scripts/run_updates.py index 3687f28..7189dcf 100644 --- a/scripts/run_updates.py +++ b/scripts/run_updates.py @@ -59,21 +59,21 @@ def main(): print("Redeployed all images, refreshing Cup") requests.get("https://cup.fntz.net/api/v3/refresh") - if DISCORD_WEBHOOK_URL: - print("sending discord notification..") - body = { - "username": "Homelab Updates", - "embeds": [ - { - "title": "Updated containers automatically!", - "description": f"Automatically redeployed containers recognized to need updates via Cup\n```{", ".join(deployable_tags)}```" - } - ] - } - headers = { - "content-type": "application/json" - } - requests.post(DISCORD_WEBHOOK_URL, json=body, headers=headers) + if DISCORD_WEBHOOK_URL: + print("sending discord notification..") + body = { + "username": "Homelab Updates", + "embeds": [ + { + "title": "Updated containers automatically!", + "description": f"Automatically redeployed containers recognized to need updates via Cup\n```{", ".join(deployable_tags)}```" + } + ] + } + headers = { + "content-type": "application/json" + } + requests.post(DISCORD_WEBHOOK_URL, json=body, headers=headers) else: print("All up to date! :)")