fawk
This commit is contained in:
+15
-15
@@ -59,21 +59,21 @@ def main():
|
|||||||
print("Redeployed all images, refreshing Cup")
|
print("Redeployed all images, refreshing Cup")
|
||||||
requests.get("https://cup.fntz.net/api/v3/refresh")
|
requests.get("https://cup.fntz.net/api/v3/refresh")
|
||||||
|
|
||||||
if DISCORD_WEBHOOK_URL:
|
if DISCORD_WEBHOOK_URL:
|
||||||
print("sending discord notification..")
|
print("sending discord notification..")
|
||||||
body = {
|
body = {
|
||||||
"username": "Homelab Updates",
|
"username": "Homelab Updates",
|
||||||
"embeds": [
|
"embeds": [
|
||||||
{
|
{
|
||||||
"title": "Updated containers automatically!",
|
"title": "Updated containers automatically!",
|
||||||
"description": f"Automatically redeployed containers recognized to need updates via Cup\n```{", ".join(deployable_tags)}```"
|
"description": f"Automatically redeployed containers recognized to need updates via Cup\n```{", ".join(deployable_tags)}```"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
headers = {
|
headers = {
|
||||||
"content-type": "application/json"
|
"content-type": "application/json"
|
||||||
}
|
}
|
||||||
requests.post(DISCORD_WEBHOOK_URL, json=body, headers=headers)
|
requests.post(DISCORD_WEBHOOK_URL, json=body, headers=headers)
|
||||||
else:
|
else:
|
||||||
print("All up to date! :)")
|
print("All up to date! :)")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user