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}`);