Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/actionify/mod.ts

Create and manage your GitHub workflows with TypeScript and Deno.
Latest
import * as actionify from "https://deno.land/x/actionify@0.3.0/mod.ts";

Classes

Actions can communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs, and other tasks.

Actions can communicate with the runner machine to set environment variables, output values used by other actions, add debug messages to the output logs, and other tasks.

An expression which is evaluated within the github action context.

An expression which is evaluated within the github action context.

A workflow is a configurable automated process made up of one or more jobs. This class creates a YAML file to define your workflow configuration.

Variables

Default context settings that work in all contexts.

Default context settings that work in all contexts.

The name of the package in the registry.

This stores the version of the module and is used to automatically tag for releases.

Functions

Prepends a directory to the system PATH variable and automatically makes it available to all subsequent actions in the current job; the currently running action cannot access the updated path variable. To see the currently defined paths for your job, you can use echo "$PATH" in a step or an action.

Prints a debug message to the log. You must create a secret named ACTIONS_STEP_DEBUG with the value true to see the debug messages set by this command in the log.

Creates an error message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.

If isDynamic is set to true the provided value is not wrapped in quotes and will be run as an expression.

You can make an environment variable available to any subsequent steps in a workflow job by defining or updating the environment variable and writing this to the GITHUB_ENV environment file. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. The names of environment variables are case-sensitive, and you can include punctuation.

Creates an expandable group in the log. To create a group, use the group command and specify a title. Anything you print to the log between the group and endgroup commands is nested inside an expandable entry in the log.

Creates a notice message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.

Sets an action's output parameter.

Masking a value prevents a string or variable from being printed in the log. Each masked word separated by whitespace is replaced with the * character. You can use an environment variable or string for the mask's value. When you mask a value, it is treated as a secret and will be redacted on the runner. For example, after you mask a value, you won't be able to set that value as an output.

Creates a warning message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.

Prepends a directory to the system PATH variable and automatically makes it available to all subsequent actions in the current job; the currently running action cannot access the updated path variable. To see the currently defined paths for your job, you can use echo "$PATH" in a step or an action.

Prints a debug message to the log. You must create a secret named ACTIONS_STEP_DEBUG with the value true to see the debug messages set by this command in the log.

Creates an error message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.

If isDynamic is set to true the provided value is not wrapped in quotes and will be run as an expression.

You can make an environment variable available to any subsequent steps in a workflow job by defining or updating the environment variable and writing this to the GITHUB_ENV environment file. The step that creates or updates the environment variable does not have access to the new value, but all subsequent steps in a job will have access. The names of environment variables are case-sensitive, and you can include punctuation.

Creates an expandable group in the log. To create a group, use the group command and specify a title. Anything you print to the log between the group and endgroup commands is nested inside an expandable entry in the log.

Creates a notice message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.

Sets an action's output parameter.

Masking a value prevents a string or variable from being printed in the log. Each masked word separated by whitespace is replaced with the * character. You can use an environment variable or string for the mask's value. When you mask a value, it is treated as a secret and will be redacted on the runner. For example, after you mask a value, you won't be able to set that value as an output.

Creates a warning message and prints the message to the log. This message will create an annotation, which can associate the message with a particular file in your repository. Optionally, your message can specify a position within the file.

Causes the step to always execute, and returns true, even when canceled. A job or step will not run when a critical failure prevents the task from running. For example, if getting sources failed.

Returns true if the workflow was canceled.

Concat a list of expressions and strings into usesable output.

Returns true if search contains item. If search is an array, this function returns true if the item is an element in the array. If search is a string, this function returns true if the item is a substring of search. This function is not case sensitive. Casts values to a string.

Returns true if searchString ends with searchValue. This function is not case sensitive. Casts values to a string.

Retrieve the desired github event from the provided context.

Wrap content as an expression.

Returns true when any previous step of a job fails. If you have a chain of dependent jobs, failure() returns true if any ancestor job fails.

Replaces values in the string, with the variable replaceValueN. Variables in the string are specified using the {N} syntax, where N is an integer. You must specify at least one replaceValue and string. There is no maximum for the number of variables (replaceValueN) you can use. Escape curly braces using double braces.

Wrap the expression in brackets to create a logical grouping.

The value for array can be an array or a string. All values in array are concatenated into a string. If you provide optionalSeparator, it is inserted between the concatenated values. Otherwise, the default separator , is used. Casts values to a string.

Negates the truthiness of the provided expression / value.

Use a logical / boolean operator to compare the leftHandSide to the rightHandSide.

Returns true when searchString starts with searchValue. This function is not case sensitive. Casts values to a string.

Returns true when none of the previous steps have failed or been canceled.

Wrap an expression or context as an interpolation ${{ <EXPRESSION> }}.

Causes the step to always execute, and returns true, even when canceled. A job or step will not run when a critical failure prevents the task from running. For example, if getting sources failed.

Returns true if the workflow was canceled.

Concat a list of expressions and strings into usesable output.

Returns true if search contains item. If search is an array, this function returns true if the item is an element in the array. If search is a string, this function returns true if the item is a substring of search. This function is not case sensitive. Casts values to a string.

Returns true if searchString ends with searchValue. This function is not case sensitive. Casts values to a string.

Retrieve the desired github event from the provided context.

Wrap content as an expression.

Returns true when any previous step of a job fails. If you have a chain of dependent jobs, failure() returns true if any ancestor job fails.

Replaces values in the string, with the variable replaceValueN. Variables in the string are specified using the {N} syntax, where N is an integer. You must specify at least one replaceValue and string. There is no maximum for the number of variables (replaceValueN) you can use. Escape curly braces using double braces.

Wrap the expression in brackets to create a logical grouping.

The value for array can be an array or a string. All values in array are concatenated into a string. If you provide optionalSeparator, it is inserted between the concatenated values. Otherwise, the default separator , is used. Casts values to a string.

Negates the truthiness of the provided expression / value.

Use a logical / boolean operator to compare the leftHandSide to the rightHandSide.

Returns true when searchString starts with searchValue. This function is not case sensitive. Casts values to a string.

Returns true when none of the previous steps have failed or been canceled.

Wrap an expression or context as an interpolation ${{ <EXPRESSION> }}.

Create a job which can be added to a workflow.

Create a step which can be added to jobs.

Create a workflow.