Actions Toolkit for Java
The GitHub Actions ToolKit for Java provides a set of packages to make creating actions easier. This software is not endorsed, distributed, or maintained by GitHub. This library is an unofficial Java port of GitHub Actions Toolkit, which was originally developed exclusively for JavaScript.
Getting Started
Java actions are not officially supported by GitHub. As such, you will need to use a Docker action to run your action code.
The toolkit is available from Maven Central.
Packages
Provides functions for inputs, outputs, results, logging, secrets and variables. Read more here
<dependency>
<groupId>com.github.kjens93.actions.toolkit</groupId>
<artifactId>actions-toolkit-core</artifactId>
<version>${actions-toolkit.version}</version>
</dependency>
Provides functions to exec cli tools and process output. Read more here
Provides functions to search for files matching glob patterns. Read more here
Provides disk i/o functions like cp, mv, rmRF, find etc. Read more here
Provides functions for downloading and caching tools. e.g. setup-* actions. Read more here
actions-toolkit-github (not started)
Provides a GitHub client hydrated with the context that the current action is being run in. Read more here
Provides functions to interact with actions artifacts. Read more here
Creating an Action with the Toolkit
Outlines the differences and why you would want to create a JavaScript or a container based action.
Actions are downloaded and run from the GitHub graph of repos. This contains guidance for versioning actions and safe releases.
Problem Matchers are a way to scan the output of actions for a specified regex pattern and surface that information prominently in the UI.
Self-hosted runners can be configured to run behind proxy servers.
Contributing
Contributions are welcome. See how to contribute.