From 9cb1d2cc26c790b7536d5b31a60feb0fb8d93fca Mon Sep 17 00:00:00 2001 From: Ian Jennings Date: Sun, 25 Feb 2024 10:35:08 -0600 Subject: [PATCH] update output --- action.yml | 5 ++++- src/index.js | 12 +++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/action.yml b/action.yml index 1bd3e9a..2956987 100644 --- a/action.yml +++ b/action.yml @@ -18,9 +18,12 @@ outputs: summary: description: >- The summary of the test result - shareLink: + link: description: >- The share link of Dashcam.io recording + markdown: + description: >- + A hotlinked image of the Dashcam.io recording runs: using: node16 main: ./dist/index.js diff --git a/src/index.js b/src/index.js index f2221b6..81cdfee 100644 --- a/src/index.js +++ b/src/index.js @@ -5,12 +5,6 @@ import { v4 as uuidv4 } from "uuid"; const UZip = require("uzip"); const colors = require("colors"); -function setOutput(summary, shareLink, conclusion) { - core.setOutput("summary", summary); - core.setOutput("share-link", shareLink); - core.setOutput("conclusion", conclusion); -} - function extractLink(markdownString) { const regex = /\[.*?\]\((.*?)\)/g; const urls = []; @@ -35,8 +29,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); const dispatchId = uuidv4(); - console.log('TestDriver: "I can help ya test that!"'.green); console.log('TestDriver: "Looking into it..."'.green); + console.log('TestDriver: "I can help ya test that!"'.green); await octokit.request( "POST /repos/{owner}/{repo}/actions/workflows/{workflow_id}/dispatches", @@ -217,4 +211,8 @@ const waitFor = (ms) => new Promise((r) => setTimeout(r, ms)); console.log("TestDriver.ai Summary".yellow); console.log(oiResult); + + core.setOutput("summary", oiResult); + core.setOutput("link", extractLink(shareLink)); + core.setOutput("markdown", shareLink); })();