Differences with @actions/toolkit

Pontil is a port of GitHub’s actions/toolkit to Gleam, not a clone. It now incorporates functionality that makes it easier to run both under GitHub Actions runners and in other environments. This guide documents intentional differences in API design, naming, and behaviour.

General Principles

Gleam conventions win over strict compatibility for pontil, and if a Gleam library provides most of the functionality of a GitHub Actions toolkit library, the existing library will be recommended unless there is specific GitHub Actions functionality required.

pontil

The pontil module implements the functionality of @actions/core and a little more.

@actions/corepontil
addPath(inputPath)add_path(input_path)
debug(message)debug(message)
error(message, properties?)error(message)
error_annotation(msg:, props:)
endGroup()group_end()
exportVariable(name, val)export_variable(name:, value:)
getBooleanInput(name, options?)get_boolean_input(name)
get_boolean_input_opts(name:, opts:)
getIDToken(aud?)get_id_token(audience)
getInput(name, options?)get_input(name)
get_input_opts(name:, opts:)
getMultilineInput(name, options?)get_multiline_input(name)
get_multiline_input_opts(name:, opts:)
getState(name)get_state(name)
group(name, fn)group(name:, do:)
group_async(name:, do:)
info(message)info(message)
isDebug()is_debug()
notice(message, properties?)notice(message)
notice_annotation(msg:, props:)
saveState(name, value)save_state(name:, value:)
setCommandEcho(enabled)set_command_echo(enabled)
setFailed(message)set_failed(message)
setOutput(name, value)set_output(name:, value:)
setSecret(secret)set_secret(secret)
startGroup(name)group_start(name)
toPosixPath(path)to_posix_path(path)
toWin32Path(path)to_win32_path(path)
toPlatformPath(path)to_platform_path(path)
warning(message, properties?)warning(message)
warning_annotation(msg:, props:)

There are also some additions:

The addition of output mode support to pontil (set_output_mode(mode) and the constructors action_mode, plaintext_mode, and ansi_mode) has changed how the output functions work in positive ways.

Platform detection (core.platform.*) and job summary support (core.summary) are separate packages, pontil_platform (gleam add pontil_platform@1) and pontil_summary (gleam add pontil_summary@1).

Portions of actions/github have been ported as pontil_context.

Packages with Gleam Alternatives

The following GitHub Actions toolkit packages will not be ported because there are suitable Gleam alternatives.

Packages Not Yet Ported

A partial implementation of action/http-client has been implemented as internal modules in pontil, but the API is not stable enough to make it public.

Search Document