From GitHub Actions
This section summarizes key differences between GitHub Actions and Space Automation and provides sample scripts to help you with the migration process.
Disclaimer: All the information about GitHub Actions is taken from the official GitHub website and is valid only at the moment of posting this document. As any product evolves over time, this information may be already outdated.
GitHub Actions | Space Automation |
---|---|
Workflow is a configurable automated process.
| (Not yet available) Pipeline is a configurable automated process.
|
Job is a defined task made up of steps.
| Job is a defined task made up of steps.
|
Step is a building block for a job.
| Step is a building block for a job.
|
Action is a portable building block that you can run as a step.
| No matching entity. |
Hello World!
| Hello World!
|
Both products provide no UI to configure your builds. The configuration is performed using script files.
GitHub Actions | Space Automation |
---|---|
YAML-based DSL for declarative scripts. If you need scripts that change execution flow, you can create custom actions based on JavaScript. | Kotlin-based DSL. You can implement any complex execution logic in place using pure Kotlin. |
GitHub Actions | Space Automation |
---|---|
Workflows are located in separate files inside the
| All configuration is done using a single
|
GitHub Actions | Space Automation |
---|---|
|
|
GitHub Actions | Space Automation |
---|---|
|
|
GitHub Actions | Space Automation |
---|---|
|
|
GitHub Actions | Space Automation |
---|---|
Running imperative code requires creating a custom action. For example, the following script gets a random joke from icanhazdadjoke.com. Workflow in
Action in
| Any step allows you to run arbitrary Kotlin code in place. For example, the following script gets a random joke from icanhazdadjoke.com using the OkHttp client.
|
GitHub Actions | Space Automation |
---|---|
To set run triggers for a job, you should use the
All triggers excepting
| To set run triggers for a job, you should use the
You cannot explicitly specify a filter by branch: Automation will go through the list of triggers in
|
GitHub Actions | Space Automation |
---|---|
You can share files between jobs using the upload-artifact and download-artifact actions. For example:
| You can share files between jobs using the special API or directly through the containers'
|
GitHub Actions | Space Automation |
---|---|
You can specify the output of one action to be the input of the following action. In the example below, the
| All steps in a job share the parameter storage. To access the storage, you should use the
|
GitHub Actions | Space Automation |
---|---|
GitHub provides its own package repository manager GitHub Packages. Workflows can use it to get and publish packages. To do this, you can use special actions (or write your own one that uses the corresponding external tool). To authenticate in GitHub Packages, you should use the
| The package repository manager in Space is called Space Packages. Some automation scenarios do not require authentication. For example, for Docker, Automation provides a special API and authentication in Packages is not required.
Nevertheless, there are cases when providing authentication credentials is required. For example, in Gradle, credentials must be specified in
|
GitHub and JetBrains Space contain multiple subsystems: project repositories, issue tracking, CI/CD, and others. Both GitHub Actions and Space Automation let you access these subsystems from your build scripts.
GitHub Actions | Space Automation |
---|---|
Working with other subsystems is possible in custom actions using JavaScript code. GitHub Actions provides subsystems API in separate npm modules that you should reference in your actions. For example, core functionality is available in the
There's also an official client oktokit that lets you work with GitHub subsystems. For example, this is how you can use it to create a new issue with custom data:
| In Space, each subsystem provides an API for accessing it. In
|
GitHub Actions | Space Automation |
---|---|
For example, this is how you run a service container with PostgreSQL:
The service runs in a separate container inside the container that runs the job. Network resources are shared between containers. The service container hostname is defined by the label ( | For example, this is how you run a service container with PostgreSQL:
The service runs in a separate container inside the container that runs the step. Network resources are shared between containers. The service container hostname is defined by the image name ( |
GitHub Actions | Space Automation |
---|---|
You can create secrets on the project or organization level. To make a secret available to an action, you must set the secret as an input or environment variable in the workflow file.
| You can create secrets and parameters only on the project level. To access secrets and parameters you should use environmental variables and a special API.
|
GitHub Actions | Space Automation |
---|---|
Apart from CI/CD, you can create custom workflows: custom scenarios that are triggered by various events in the system and can change the system state. How does it look: Place a | Not yet available. What is planned: You can create a custom Automation workflow that can be triggered by Space webhooks. As in |
GitHub Actions | Space Automation |
---|---|
Using
| Not yet available. As a workaround, you can create a number of jobs – one for each version. |
GitHub Actions | Space Automation |
---|---|
The UI is represented with the Actions tab of a particular project. Here you can view workflow logs, run and cancel workflow execution, view artifacts. Test results are available only in the form of logs. | The UI is represented with the Jobs page of a particular project. Here you can view, run, cancel jobs, view artifacts, and more. Test results are shown with a table that lets you instantly see failed tests. |
GitHub Actions | Space Automation |
---|---|
Using a 'hello-world' container:
| Using a 'hello-world' container
|
Using the
| Using the
|
GitHub Actions | Space Automation |
---|---|
First, you should configure Java in a virtual machine using the
| Use the special
|
GitHub Actions | Space Automation |
---|---|
| Use the special
|
Thanks for your feedback!