github: handle malformed runtime token
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
@@ -55,9 +55,15 @@ export class GitHub {
|
||||
}
|
||||
|
||||
public static async printActionsRuntimeTokenACs() {
|
||||
const jwt = GitHub.actionsRuntimeToken;
|
||||
let jwt: GitHubActionsRuntimeToken | undefined;
|
||||
try {
|
||||
jwt = GitHub.actionsRuntimeToken;
|
||||
} catch (e) {
|
||||
core.warning(`Cannot parse Actions Runtime Token: ${e.message}`);
|
||||
return;
|
||||
}
|
||||
if (!jwt) {
|
||||
core.info(`ACTIONS_RUNTIME_TOKEN not set`);
|
||||
core.warning(`ACTIONS_RUNTIME_TOKEN not set`);
|
||||
return;
|
||||
}
|
||||
try {
|
||||
|
||||
Reference in New Issue
Block a user