Skip to content
Latchkey

How to Migrate From Bitbucket Pipelines to GitHub Actions

Bitbucket pipelines and steps map to Actions jobs and steps, image maps to container, caches map to actions/cache, and services map to service containers.

Bitbucket pipelines group ordered steps. In Actions those become jobs with needs (or steps in one job). image becomes container:, caches become actions/cache, and services become the services: block.

Concept mapping

bitbucket-pipelines.ymlGitHub Actions
pipelines.defaulton: [push, pull_request]
step:a job or grouped steps
image:container:
caches:actions/cache
services:services: (service containers)
deployment:environment: on a job

Before

bitbucket-pipelines.yml
image: node:20
pipelines:
  default:
    - step:
        caches: [node]
        script:
          - npm ci
          - npm test

After

.github/workflows/ci.yml
on: [push, pull_request]
jobs:
  test:
    runs-on: ubuntu-latest
    container: node:20
    steps:
      - uses: actions/checkout@v4
      - uses: actions/cache@v4
        with:
          path: ~/.npm
          key: npm-${{ hashFiles('package-lock.json') }}
      - run: npm ci
      - run: npm test

What does not map cleanly

  • Bitbucket named caches (like node) are predefined; in Actions you spell out the path and key yourself.
  • Bitbucket step size (2x, 4x) is chosen inline; in Actions you pick a larger runner label instead.
  • Bitbucket deployments and their permissions become environments with reviewers in Actions.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →