Test with local action
This commit is contained in:
committed by
pullfrog[bot]
parent
2514bb1cf7
commit
6bd4097992
@@ -0,0 +1,7 @@
|
|||||||
|
name: "Check GitHub Token"
|
||||||
|
description: "Check if GITHUB_TOKEN environment variable exists"
|
||||||
|
author: "Pullfrog"
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: "node24"
|
||||||
|
main: "entry.ts"
|
||||||
@@ -0,0 +1,20 @@
|
|||||||
|
#!/usr/bin/env node
|
||||||
|
|
||||||
|
/**
|
||||||
|
* simple check that GITHUB_TOKEN env var exists
|
||||||
|
*/
|
||||||
|
|
||||||
|
import * as core from "@actions/core";
|
||||||
|
|
||||||
|
async function run(): Promise<void> {
|
||||||
|
const token = process.env.GITHUB_TOKEN;
|
||||||
|
|
||||||
|
if (token) {
|
||||||
|
core.info(`GITHUB_TOKEN exists`);
|
||||||
|
core.info(`token prefix: ${token.substring(0, 10)}...`);
|
||||||
|
} else {
|
||||||
|
core.setFailed("GITHUB_TOKEN does not exist");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
await run();
|
||||||
Reference in New Issue
Block a user