The following tables list the functionality of the GitHub Actions libraries and
whether or not they are currently supported by local-action
.
Note
Workflow commands
are currently unsupported. Since local-action
only supports
JavaScript/TypeScript actions, it is assumed that they are using the
GitHub Actions Toolkit.
The stubbed version of @actions/artifact
functions similarly to the real
package. However, any artifacts that are created as part of a local-action
run
will be stored on your local workstation. The specific path must be set using
the LOCAL_ACTION_ARTIFACT_PATH
environment variable in the .env
file passed
to the local-action
command.
Note
If this variable is not set, and you attempt to interact with
@actions/artifact
, you will receive an error message.
Feature | Supported | Notes |
---|---|---|
deleteArtifact() |
✅ | |
downloadArtifact() |
✅ | |
getArtifact() |
✅ | |
listArtifacts() |
✅ | |
uploadArtifact() |
✅ | Retention settings are ignored |
Important
When working with artifacts that were created as part of actual GitHub Actions workflow runs (e.g. if you try to download an artifact from a different repository), these requests will be passed to the GitHub API.
Feature | Supported | Notes |
---|---|---|
exportVariable() |
✅ | |
setSecret() |
✅ | |
addPath() |
✅ | |
getInput() |
✅ | |
getMultilineInput() |
✅ | |
getBooleanInput() |
✅ | |
setOutput() |
✅ | |
setCommandEcho() |
✅ | Setting is not currently in use |
setFailed() |
✅ | |
isDebug() |
✅ | |
debug() |
✅ | |
error() |
✅ | |
warning() |
✅ | |
notice() |
✅ | |
info() |
✅ | |
startGroup() |
✅ | |
endGroup() |
✅ | |
group() |
✅ | |
saveState() |
✅ | State is not currently in use |
getState() |
✅ | State is not currently in use |
getIDToken() |
⛔ | |
summary.* |
✅ | |
toPosixPath() |
✅ | |
toWin32Path() |
✅ | |
toPlatformPath() |
✅ | |
platform.* |
✅ |
The stubbed version of @actions/github
functions the same as the real package.
However, the functionality is stubbed in order to ensure that all needed
environment variables are pulled from the .env
file passed to the
local-action
command. Otherwise, things like github.context.eventName
will
be undefined
. For more information, see
#149.
The following packages are under investigation for how to integrate with
local-action
. Make sure to check back later!
Currently, there shouldn't be any need to stub the functionality of the
following packages from the GitHub Actions Toolkit; they should function as
expected when run using local-action
. If you do encounter a scenario where
this doesn't work correctly, please
open an issue!