Loading CircleCI to GitHub Actions Converter...

How to Convert CircleCI to GitHub Actions - Step by Step Guide

Step 1

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:

•
Paste directly: Copy the contents of config.yml into the input editor.
•
Upload file: Click "Upload" and pick the file from your computer.
•
Try sample: Click "Sample" to load a small config with a build job, a test job and a workflow tying them together.

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: main
Step 2

Read the Converted Workflow

The output follows your CircleCI workflows closely:

•
Jobs and requires: each job a workflow runs becomes a GitHub job, and requires becomes needs.
•
Filters and schedules: branch and tag filters turn into if: checks, and scheduled workflows into cron triggers.
•
Executors: the first docker image becomes the job container, extra images become services, machine and macos pick a GitHub runner.
•
Commands and parameters: reusable commands are expanded and parameters filled in; a matrix becomes strategy.matrix.
•
Caches and workspaces: restore_cache and save_cache become actions/cache with hashFiles keys; workspaces become artifacts.
•
Notes: orbs, approvals, contexts and anything else that has no direct match are listed in comments at the top.

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 deploy
Step 3

Work Through the Notes

Before you commit, go through the comment block at the top of the output:

•
Replace orbs: swap each TODO placeholder for an action from the GitHub Actions Marketplace.
•
Add secrets: project and context variables live in CircleCI's settings, so add them under Settings, Secrets and variables, Actions.
•
Approvals: where CircleCI paused for an approval, use a GitHub environment with required reviewers.
•
Variables: change $CIRCLE_BRANCH, $CIRCLE_SHA1 and similar to the GitHub names suggested in the notes.
Step 4

Commit the Workflow

Save the file and let GitHub pick it up:

•
Download: click "Download" to save github-workflow.yml.
•
Place it: put the file in the .github/workflows/ folder of your repository.
•
Push: commit and push; the first run appears on the Actions tab.

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.