From 5ce91c28e366aa293ca4f0e3c752ba4102e9b6f9 Mon Sep 17 00:00:00 2001 From: Hakan Lundvall Date: Tue, 2 Jan 2024 17:56:15 +0100 Subject: [PATCH] debug --- http-push.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/http-push.js b/http-push.js index 1348785..ca75e58 100644 --- a/http-push.js +++ b/http-push.js @@ -6,7 +6,6 @@ let httpc = new http.HttpClient('github-actions'); let run_id = process.env.GITHUB_RUN_ID; let commit_hash = process.env.COMMIT_HASH; - console.log(`Pushing ${payload}`); let res = await httpc.get(`https://api.github.com/repos/hakanlundvall/templog/actions/runs/${run_id}/artifacts`, headers); if (res.message.statusCode != 200) { @@ -17,12 +16,13 @@ let httpc = new http.HttpClient('github-actions'); console.log(artifacts); headers = { 'Content-Type': 'application/json'} - + let payload = JSON.stringify({ run_id, commit_hash }); - + console.log(`Pushing ${payload}`); + res = await httpc.post('https://www.lundvall.info/templog/firmware', payload, headers); if (res.message.statusCode != 200) { throw new Error(`Failed to push: ${res.message.statusMessage}`);