Migrate from GitHub Actions
This document provides an overview of how to migrate from GitHub Actions to CircleCI.
The CircleCI configuration translator provides a way to convert your GitHub Actions or GitLab config into a CircleCI config.yml file. The configuration translator is currently in open preview. |
Concepts
Jobs and workflows
Both GitHub Actions and CircleCI share similar concepts around "jobs" and "workflows". A workflow is an end-to-end flow of connected jobs, which in turn consist of commands to achieve an atomic task (for example, "run unit tests" or "build a Docker image").
CircleCI differs primarily in configuration syntax, setting up workflow and job dependencies in a separate section as opposed to inline in the job.
GitHub | CircleCI |
---|---|
| |
Actions vs. orbs
"Actions" in GitHub are reusable commands or tasks to run inside a job. However, they are written for execution inside a Docker container or coded as individual steps using JavaScript. This adds additional work and limits the scope in which they can be applied.
CircleCI offers similar functionality in our orbs. The primary difference is that CircleCI orbs are just packaged, reusable YAML, so you can create orbs with reusable jobs, executors, or commands, and use them however you see fit in any of your jobs or workflows.
GitHub offers browsing of Actions in their Marketplace; CircleCI has an Orb Registry as well as an Integrations Page containing numerous Certified, Partner, and community orbs / integrations.
Runners vs. executors
In GitHub, you can specify your builds to run in Linux, macOS, and Windows environments via a runs-on
key in the YAML, and if you want to run anything in a container, you specify an additional container
key.
In CircleCI, you have the same choice of environments (called Executors), with additional options and features for Docker.
For each of the executor types, you have a choice of different versions which will subsequently have various versions of base software installed.
See the table in the next section to compare configuration.
Configuration comparison
Using Docker? Authenticating Docker pulls from image registries is recommended when using the Docker execution environment. Authenticated pulls allow access to private Docker images, and may also grant higher rate limits, depending on your registry provider. For further information see Using Docker authenticated pulls. |
GitHub Config | CircleCI Config |
---|---|
Specifying execution environment. While container execution is specified separately in GitHub, | |
| |
Specifying dependencies/services. All images specified after the first in CircleCI are treated as dependencies. | |
| |
Specifying steps to run in a job. Similar functionality, different syntax. | |
| |
Using shared tasks (Actions for GitHub, orbs for CircleCI). In CircleCI, you declare orbs at the top level | |
| |
Using conditional steps in the workflow. CircleCI offers basic conditions on steps (for example, | |
| |
For more configuration examples on CircleCI, visit our Examples and Guides Overview and Example Projects pages.
Since the configuration between GitHub Actions and CircleCI is similar, it should be fairly trivial to migrate your jobs and workflows. However, for best chances of success, we recommend migrating over items in the following order: