From ad86401bf225424539d1b50d7b1a1e3f715e4e93 Mon Sep 17 00:00:00 2001 From: TheArcaneBrony Date: Tue, 4 Apr 2023 04:50:48 +0200 Subject: Attempt to fix auto-redeploy --- modules/auto-redeploy.nix | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/modules/auto-redeploy.nix b/modules/auto-redeploy.nix index ae415ca..d082ebb 100644 --- a/modules/auto-redeploy.nix +++ b/modules/auto-redeploy.nix @@ -49,8 +49,12 @@ nixos-rebuild switch --flake ".#${config.networking.hostName}" -j`nproc` --upgrade-all git rm --cached hardware-configuration.nix ) 2>&1 | tee /tmp/update.log - #send the output to discord as a file - curl -S -F "file=@/tmp/update.log" -F "filename=update.log" -F "content=System finished redeploy. Logs:" -H "Content-Type: multipart/form-data" ${secrets.webhooks.discord.deploy} + #send the output to discord as a file, with hostname as username, use paload_json + curl -S -F "file=@/tmp/update.log" -F "filename=update.log" -F 'payload_json={"username": "${config.networking.hostName} - redeploy", "content": "Redeploy finished! Logs:"}' -H "Content-Type: multipart/form-data" ${secrets.webhooks.discord.deploy} + + + + #store current commit in file echo $(git rev-parse HEAD) > currentCommit ''; -- cgit 1.4.1