Differences with @actions/toolkit

Pontil is a port of GitHub’s actions/toolkit to Gleam, not a clone. 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 wins.

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)1
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:

Platform detection (core.platform.*) from @actions/core has been extracted into a separate package, pontil_platform (gleam add pontil_platform@1), imported as pontil/platform and supporting both Erlang and JavaScript targets and detects the runtime environment (Node, Deno, Bun, Erlang).

Similarly, job summary support has been extracted into a separate package, pontil_summary (gleam add pontil_summary@1).

1

pontil.info exists only for consistency. Just as core.info calls console.log in JavaScript, pontil.info calls io.println. No more, no less.

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 an internal module in pontil, but the API is not stable enough to make it public. This also prevents the port of action/github.

Search Document