From b1d4840aef9378244dce59fddb54c16962ecca83 Mon Sep 17 00:00:00 2001 From: Corey Butler Date: Mon, 2 Sep 2019 17:05:03 -0500 Subject: [PATCH] WIP --- lib/main.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/main.js b/lib/main.js index bb5aded..9f3fbed 100644 --- a/lib/main.js +++ b/lib/main.js @@ -1,18 +1,24 @@ // import * as core from '@actions/core'; +const github = require('@actions/github') const core = require('@actions/core') const fs = require('fs') const path = require('path') async function run() { try { + // const myToken = core.getInput('myToken'); + // const octokit = new github.GitHub(myToken) // const myInput = core.getInput('myInput') // core.debug(`Hello ${myInput}`) + core.warning(process.env.INPUT_GITHUB_TOKEN) let dir = fs.readdirSync(path.resolve(process.env.GITHUB_WORKSPACE), { withFileTypes: true }).map(entry => { return `${entry.isDirectory() ? '> ' : ' - '}${entry.name}` }).join('\n') - core.warning(`Working Directory: ${process.env.GITHUB_WORKSPACE}:\n${dir}`) - core.warning(`Available environment variables:\n -> ${Object.keys(process.env).join('\n -> ')}`) + core.warning(` Working Directory: ${process.env.GITHUB_WORKSPACE}:\n${dir}`) + core.warning(` Available environment variables:\n -> ${Object.keys(process.env).map(i => t + ' :: ' +process.env[i]).join('\n -> ')}`) + + core.setOutput('tag', '') } catch (error) {