mirror of
https://code.forgejo.org/docker/actions-toolkit.git
synced 2025-06-24 14:48:22 -04:00
github: fix jwt-decode import and test
Signed-off-by: CrazyMax <crazy-max@users.noreply.github.com>
This commit is contained in:
parent
a625c7487f
commit
0e5f8a766a
2 changed files with 3 additions and 3 deletions
|
@ -18,7 +18,7 @@ import {GitHub as Octokit} from '@actions/github/lib/utils';
|
|||
import * as core from '@actions/core';
|
||||
import * as github from '@actions/github';
|
||||
import {Context} from '@actions/github/lib/context';
|
||||
import jwt_decode from 'jwt-decode';
|
||||
import {jwtDecode, JwtPayload} from 'jwt-decode';
|
||||
|
||||
import {GitHubActionsRuntimeToken, GitHubActionsRuntimeTokenAC, GitHubRepo} from './types/github';
|
||||
|
||||
|
@ -51,7 +51,7 @@ export class GitHub {
|
|||
|
||||
static get actionsRuntimeToken(): GitHubActionsRuntimeToken | undefined {
|
||||
const token = process.env['ACTIONS_RUNTIME_TOKEN'] || '';
|
||||
return token ? jwt_decode<GitHubActionsRuntimeToken>(token) : undefined;
|
||||
return token ? (jwtDecode<JwtPayload>(token) as GitHubActionsRuntimeToken) : undefined;
|
||||
}
|
||||
|
||||
public static async printActionsRuntimeTokenACs() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue