@actions/core
- Version 1.11.1
- Published
- 90.9 kB
- 2 dependencies
- MIT license
Install
npm i @actions/coreyarn add @actions/corepnpm add @actions/coreOverview
Actions core lib
Index
Variables
Functions
Interfaces
Enums
Namespaces
Variables
variable markdownSummary
const markdownSummary: Summary;- Deprecated- use - core.summary
variable summary
const summary: Summary;Functions
function addPath
addPath: (inputPath: string) => void;- Prepends inputPath to the PATH (for this action and future actions) - Parameter inputPath
function debug
debug: (message: string) => void;- Writes debug message to user log - Parameter message- debug message 
function endGroup
endGroup: () => void;- End an output group. 
function error
error: (message: string | Error, properties?: AnnotationProperties) => void;- Adds an error issue - Parameter message- error issue message. Errors will be converted to string via toString() - Parameter properties- optional properties to add to the annotation. 
function exportVariable
exportVariable: (name: string, val: any) => void;- Sets env variable for this action and future actions in the job - Parameter name- the name of the variable to set - Parameter val- the value of the variable. Non-string values will be converted to a string via JSON.stringify 
function getBooleanInput
getBooleanInput: (name: string, options?: InputOptions) => boolean;- Gets the input value of the boolean type in the YAML 1.2 "core schema" specification. Support boolean input list: - true | True | TRUE | false | False | FALSE. The return value is also in boolean type. ref: https://yaml.org/spec/1.2/spec.html#id2804923- Parameter name- name of the input to get - Parameter options- optional. See InputOptions. - Returns- boolean 
function getIDToken
getIDToken: (aud?: string) => Promise<string>;function getInput
getInput: (name: string, options?: InputOptions) => string;- Gets the value of an input. Unless trimWhitespace is set to false in InputOptions, the value is also trimmed. Returns an empty string if the value is not defined. - Parameter name- name of the input to get - Parameter options- optional. See InputOptions. - Returns- string 
function getMultilineInput
getMultilineInput: (name: string, options?: InputOptions) => string[];- Gets the values of an multiline input. Each value is also trimmed. - Parameter name- name of the input to get - Parameter options- optional. See InputOptions. - Returns- string[] 
function getState
getState: (name: string) => string;- Gets the value of an state set by this action's main execution. - Parameter name- name of the state to get - Returns- string 
function group
group: <T>(name: string, fn: () => Promise<T>) => Promise<T>;- Wrap an asynchronous function call in a group. - Returns the same type as the function itself. - Parameter name- The name of the group - Parameter fn- The function to wrap in the group 
function info
info: (message: string) => void;- Writes info to log with console.log. - Parameter message- info message 
function isDebug
isDebug: () => boolean;- Gets whether Actions Step Debug is on or not 
function notice
notice: (message: string | Error, properties?: AnnotationProperties) => void;- Adds a notice issue - Parameter message- notice issue message. Errors will be converted to string via toString() - Parameter properties- optional properties to add to the annotation. 
function saveState
saveState: (name: string, value: any) => void;- Saves state for current action, the state can only be retrieved by this action's post job execution. - Parameter name- name of the state to store - Parameter value- value to store. Non-string values will be converted to a string via JSON.stringify 
function setCommandEcho
setCommandEcho: (enabled: boolean) => void;- Enables or disables the echoing of commands into stdout for the rest of the step. Echoing is disabled by default if ACTIONS_STEP_DEBUG is not set. 
function setFailed
setFailed: (message: string | Error) => void;- Sets the action status to failed. When the action exits it will be with an exit code of 1 - Parameter message- add error issue message 
function setOutput
setOutput: (name: string, value: any) => void;- Sets the value of an output. - Parameter name- name of the output to set - Parameter value- value to store. Non-string values will be converted to a string via JSON.stringify 
function setSecret
setSecret: (secret: string) => void;- Registers a secret which will get masked from logs - Parameter secret- value of the secret 
function startGroup
startGroup: (name: string) => void;- Begin an output group. - Output until the next - groupEndwill be foldable in this group- Parameter name- The name of the output group 
function toPlatformPath
toPlatformPath: (pth: string) => string;- toPlatformPath converts the given path to a platform-specific path. It does this by replacing instances of / and \ with the platform-specific path separator. - Parameter pth- The path to platformize. string The platform-specific path. 
function toPosixPath
toPosixPath: (pth: string) => string;- toPosixPath converts the given path to the posix form. On Windows, \ will be replaced with /. - Parameter- pth. Path to transform. string Posix path. 
function toWin32Path
toWin32Path: (pth: string) => string;- toWin32Path converts the given path to the win32 form. On Linux, / will be replaced with \. - Parameter- pth. Path to transform. string Win32 path. 
function warning
warning: (message: string | Error, properties?: AnnotationProperties) => void;- Adds a warning issue - Parameter message- warning issue message. Errors will be converted to string via toString() - Parameter properties- optional properties to add to the annotation. 
Interfaces
interface AnnotationProperties
interface AnnotationProperties {}- Optional properties that can be sent with annotation commands (notice, error, and warning) See: https://docs.github.com/en/rest/reference/checks#create-a-check-run for more information about annotations. 
property endColumn
endColumn?: number;- The end column for the annotation. Cannot be sent when - startLineand- endLineare different values. Defaults to- startColumnwhen- startColumnis provided.
property endLine
endLine?: number;- The end line for the annotation. Defaults to - startLinewhen- startLineis provided.
property file
file?: string;- The path of the file for which the annotation should be created. 
property startColumn
startColumn?: number;- The start column for the annotation. Cannot be sent when - startLineand- endLineare different values.
property startLine
startLine?: number;- The start line for the annotation. 
property title
title?: string;- A title for the annotation. 
interface InputOptions
interface InputOptions {}- Interface for getInput options 
property required
required?: boolean;- Optional. Whether the input is required. If required and not present, will throw. Defaults to false 
property trimWhitespace
trimWhitespace?: boolean;- Optional. Whether leading/trailing whitespace will be trimmed for the input. Defaults to true 
Enums
Namespaces
namespace platform
module 'lib/platform.d.ts' {}variable arch
const arch: string;variable isLinux
const isLinux: boolean;variable isMacOS
const isMacOS: boolean;variable isWindows
const isWindows: boolean;variable platform
const platform: NodeJS.Platform;function getDetails
getDetails: () => Promise<{    name: string;    platform: string;    arch: string;    version: string;    isWindows: boolean;    isMacOS: boolean;    isLinux: boolean;}>;Package Files (4)
Dependencies (2)
Dev Dependencies (1)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@actions/core.
- Markdown[](https://www.jsdocs.io/package/@actions/core)
- HTML<a href="https://www.jsdocs.io/package/@actions/core"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
 Package analyzed in 1465 ms.
- Missing or incorrect documentation? Open an issue for this package.
