mirror of
https://github.com/ButlerLogic/action-autotag.git
synced 2024-11-10 10:21:08 +07:00
24 lines
721 B
JavaScript
24 lines
721 B
JavaScript
// import * as core from '@actions/core';
|
|
const core = require('@actions/core')
|
|
const fs = require('fs')
|
|
const path = require('path')
|
|
|
|
async function run() {
|
|
try {
|
|
// const myInput = core.getInput('myInput')
|
|
// core.debug(`Hello ${myInput}`)
|
|
let dir = fs.readdirSync(path.resolve(process.env.GITHUB_WORKSPACE), { withFileTypes: true }).map(entry => {
|
|
return `${entry.isDirectory() ? '> ' : ' - '}${entry.name}`
|
|
}).join('\n')
|
|
|
|
core.debug(`Working Directory: ${process.env.GITHUB_WORKSPACE}:\n${dir}`)
|
|
core.warning(`Available environment variables:\n -> ${Object.keys(process.env).join('\n -> ')}`)
|
|
|
|
core.setOutput('')
|
|
} catch (error) {
|
|
core.setFailed(error.message)
|
|
}
|
|
}
|
|
|
|
run()
|