How to Convert CircleCI to GitHub Actions - Step by Step Guide
Input Your CircleCI Configuration
Start with your CircleCI config.yml, usually found at .circleci/config.yml. Whether you are moving to GitHub Actions for good or just want to see what the move would look like:
Example: CircleCI Configuration
A build job with a dependency cache and a deploy job that only runs on main:
version: 2.1
jobs:
build:
docker:
- image: cimg/node:20.11
steps:
- checkout
- restore_cache:
keys:
- deps-{{ checksum "package-lock.json" }}
- run: npm ci
- save_cache:
key: deps-{{ checksum "package-lock.json" }}
paths:
- ~/.npm
- run: npm run build
deploy:
docker:
- image: cimg/node:20.11
steps:
- checkout
- run: npm run deploy
workflows:
build-and-deploy:
jobs:
- build
- deploy:
requires:
- build
filters:
branches:
only: mainRead the Converted Workflow
The output follows your CircleCI workflows closely:
Example: Converted GitHub Actions Workflow
The Step 1 config as GitHub Actions YAML:
# Converted from CircleCI. Check these before you use the workflow:
# - Jobs on CircleCI's own images (cimg/..., circleci/...) run them with --user root. Those images use a non-root user, and actions/checkout can't write to the workspace as that user.
name: build-and-deploy
'on':
push:
branches:
- '**'
jobs:
build:
runs-on: ubuntu-latest
container:
image: cimg/node:20.11
options: '--user root'
steps:
- uses: actions/checkout@v4
- name: Restore cache
uses: actions/cache@v4
with:
path: ~/.npm
key: deps-${{ hashFiles('package-lock.json') }}
- run: npm ci
- run: npm run build
deploy:
runs-on: ubuntu-latest
needs:
- build
if: github.ref == 'refs/heads/main'
container:
image: cimg/node:20.11
options: '--user root'
steps:
- uses: actions/checkout@v4
- run: npm run deployWork Through the Notes
Before you commit, go through the comment block at the top of the output:
Commit the Workflow
Save the file and let GitHub pick it up:
.github/workflows/ folder of your repository.Frequently Asked Questions
How do CircleCI workflows and jobs map onto one GitHub workflow?
Every job a workflow runs becomes a GitHub job, and its requires list becomes needs. When the file has more than one workflow, the job ids get the workflow name in front (nightly_build) so nothing collides. Branch and tag filters turn into if: checks on the job, scheduled workflows become cron triggers whose jobs only run on that schedule, and a matrix becomes strategy.matrix with << parameters.x >> replaced by ${{ matrix.x }}.
What happens to orbs?
An orb is CircleCI's own package format, so there is nothing to translate it into automatically. Each orb command or orb job becomes a placeholder step that echoes a TODO, and the notes at the top of the output say which orb it came from and suggest an action to start with, such as actions/setup-node for the node orb or slackapi/slack-github-action for slack.
Are executors, reusable commands and parameters handled?
Yes, as long as they are defined in the same file. Executors are resolved to a runner (docker images become a container job, machine becomes ubuntu-latest, macos becomes macos-latest), reusable commands are expanded in place, and parameters are filled in from the values the workflow passes or from their defaults. Anything that still contains << ... >> afterwards is flagged.
How are caches and workspaces converted?
A restore_cache is joined with the save_cache that uses the same key and becomes one actions/cache step, which restores at that point and saves when the job finishes. Templates in keys are rewritten too: {{ checksum "package-lock.json" }} becomes ${{ hashFiles('package-lock.json') }} and {{ .Branch }} becomes ${{ github.ref_name }}. persist_to_workspace and attach_workspace become upload-artifact and download-artifact steps.
Will environment values like long IDs, zip codes or dates change?
No. Values are read as the exact text you typed, so 8901240544102066246, 00501, 14.50, yes and 2024-01-15 come out unchanged, and the ones a YAML reader would turn into a number, boolean or date are quoted in the workflow. Run commands are copied character for character.
Which parts are not converted?
Approval jobs, contexts, resource classes, parallelism, add_ssh_keys, setup_remote_docker, when conditions that depend on runtime values and any key the converter does not know. Each one is listed in the comment block at the top of the output with the workflow, job and step it came from. Project and context variables live in CircleCI's settings, so add them as GitHub secrets yourself, and swap $CIRCLE_BRANCH and friends for the GitHub variables suggested in the notes.
Is my config uploaded anywhere?
No. The conversion runs in your browser; nothing is sent to a server or kept, and a reload starts with an empty editor.
Going the other way? The GitHub Actions to CircleCI converter does that. There are also converters for Bitbucket Pipelines, GitLab CI, Jenkins, Travis CI and Azure Pipelines.
Related Tools
Jenkins to GitHub Actions
Convert Jenkins pipelines (Jenkinsfile) to GitHub Actions workflows — stages, parallel stages, when-conditions, post blocks and environment become jobs and steps, and anything it can't convert is listed in notes
GitLab CI to GitHub Actions
Convert GitLab CI/CD pipelines to GitHub Actions workflows with jobs, artifacts, and variables
CI/CD Pipeline Fixer
Fix broken CI/CD pipeline configurations automatically, repair GitHub Actions, GitLab CI, Jenkins, and Azure Pipelines YAML errors
Azure Pipelines to GitHub Actions
Convert Azure Pipelines YAML to GitHub Actions workflows with jobs, tasks, and stages
Travis CI to GitHub Actions
Convert .travis.yml to GitHub Actions workflows with language support, caching, and lifecycle hooks
GitHub Actions to GitLab CI
Convert GitHub Actions workflows to GitLab CI configuration with jobs, stages, and rules