From 2ca30dd8d21bccd97cbae6064b598c96d11df391 Mon Sep 17 00:00:00 2001 From: Shakar <5h4k4r.b4kr@gmail.com> Date: Sun, 17 Sep 2023 13:46:26 +0300 Subject: [PATCH] rename index.js to ts Signed-off-by: Shakar <5h4k4r.b4kr@gmail.com> --- index.js => index.ts | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) rename index.js => index.ts (52%) diff --git a/index.js b/index.ts similarity index 52% rename from index.js rename to index.ts index adfe235..a3e554e 100644 --- a/index.js +++ b/index.ts @@ -1,13 +1,20 @@ -const core = require('@actions/core'); -const github = require('@actions/github'); - - +import * as core from '@actions/core' +import * as github from '@actions/github' +import * as fs from 'fs'; try { const label = core.getInput('label'); console.log(`Label: ${label}`) core.setOutput("label", label); + + fs.readFile('/Readme.md', 'utf8', (err, data) => { + if (err) { + console.error(err); + return; + } + console.log(`File data: ${data}`); + }); const payload = JSON.stringify(github.context.payload, undefined, 2) console.log(`The event payload: ${payload}`);