Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
hakanlundvall committed Jan 2, 2024
1 parent c8f1c5f commit 5ce91c2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions http-push.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -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}`);
Expand Down

0 comments on commit 5ce91c2

Please sign in to comment.