mirror of
https://github.com/actions/container-toolkit-action.git
synced 2025-12-16 07:46:52 +00:00
Add toolkit example to container (#1)
* Add toolkit * Remove entrypoint * Use a node container * Debug * Temporarily remove package-lock.json for local dependencies * Clean up * Get logging working * Use entrypoint * Debug * Debug * Just print repo name
This commit is contained in:
17
src/main.ts
Normal file
17
src/main.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
const core = require('@actions/core');
|
||||
const github = require('@actions/github');
|
||||
|
||||
async function run() {
|
||||
try {
|
||||
const myInput = core.getInput('myInput');
|
||||
core.debug(`Hello ${myInput} from inside a container`);
|
||||
|
||||
// Get github context data
|
||||
const context = github.context;
|
||||
console.log(`We can even get context data, like the repo: ${context.repo.repo}`)
|
||||
} catch (error) {
|
||||
core.setFailed(error.message);
|
||||
}
|
||||
}
|
||||
|
||||
run();
|
||||
Reference in New Issue
Block a user