Loading Drone CI to GitHub Actions Converter...

How to Convert Drone CI to GitHub Actions - Step by Step Guide

Step 1

Input Your Drone CI Configuration

Start with your existing .drone.yml file, the whole thing, including every pipeline separated by ---:

•
Paste directly: copy your .drone.yml content into the editor.
•
Upload file: click "Upload" and pick your .drone.yml file.
•
Try sample: click "Sample" to load a pipeline with a docker plugin and secrets.

Example: Drone CI Configuration

Here is a small Drone docker pipeline:

kind: pipeline
type: docker
name: default

steps:
  - name: build
    image: node:18
    commands:
      - npm install
      - npm run build

  - name: test
    image: node:18
    environment:
      API_TOKEN:
        from_secret: api_token
    commands:
      - npm test

trigger:
  branch:
    - main
  event:
    - push
    - pull_request
Step 2

How the Pieces Are Mapped

The converter rewrites your Drone pipeline like this:

•
Pipelines to jobs: each pipeline document becomes a job, and depends_on between pipelines becomes needs.
•
Images: one shared image becomes the job container; steps with different images each run in their own image through docker run.
•
Triggers and when: event and branch filters become the workflow's on: section and if: checks; status failure becomes failure().
•
Secrets: from_secret values become ${{ secrets.NAME }} references.
•
Services: Drone services become GitHub service containers, reachable by the same host name.
•
Plugins: plugin steps become placeholder steps that keep their settings as PLUGIN_* variables.

Example: Converted GitHub Actions Workflow

This is what the converter writes for the file above, in GitHub Actions YAML:

# Converted from Drone CI. Check these before you use the workflow:
# - Add these repository secrets in GitHub (Settings > Secrets and variables > Actions): API_TOKEN.

name: default
'on':
  push:
    branches:
      - main
  pull_request:
    branches:
      - main
jobs:
  default:
    name: default
    runs-on: ubuntu-latest
    container:
      image: node:18
    steps:
      - uses: actions/checkout@v4
      - name: build
        run: |-
          npm install
          npm run build
      - name: test
        env:
          API_TOKEN: ${{ secrets.API_TOKEN }}
        run: npm test
Step 3

Review and Customize

The comment block at the top of the output is your to-do list:

•
Add secrets: every from_secret name is listed; add each one as a GitHub repository secret.
•
Replace plugins: swap each placeholder step for a Marketplace action or a shell step.
•
Drone variables: commands that use $DRONE_BRANCH, $DRONE_COMMIT and friends need the GitHub names.
•
Volumes and cron: host volumes, cron jobs and promote/rollback events need a hand, since GitHub handles them differently.
Step 4

Add the Workflow to Your Repository

•
Download workflow: click "Download" to save workflow.yml.
•
Add it: put the file in .github/workflows/ at the root of your repository (create the folder if needed).
•
Commit and push: GitHub picks the workflow up on the next push and shows the run on the Actions tab.

Frequently Asked Questions

How does a .drone.yml map onto a GitHub workflow?

Every "kind: pipeline" document becomes one GitHub job, and its steps become the steps of that job, in the same order. A pipeline's depends_on turns into needs, so a deploy pipeline still waits for the build. Drone runs each step in its own image: when every command step uses the same image, that image becomes the job container; when they differ, each step runs its commands with docker run in its own image, with the code mounted at /drone/src just like in Drone.

What happens to trigger and when blocks?

The trigger of a pipeline sets the workflow's on: filter (push, pull_request and tag pushes, with the branch list) and, when a file has several pipelines, an if: check on each job. A step's when block becomes an if: on that step. Branch filters compare against the target branch for pull requests, as Drone does. status: failure becomes failure(), and success plus failure becomes always(). Cron, promote, rollback, repo and target conditions have no direct GitHub version, so they are listed in the notes.

What does from_secret turn into?

A value written as from_secret: docker_password becomes ${{ secrets.DOCKER_PASSWORD }}, in step and pipeline environment, service environment and plugin settings. The notes at the top list every secret name, so you can add them under Settings, Secrets and variables, Actions before the first run. A "kind: secret" document that reads from a Drone secret store is named in the notes too.

What happens to Drone plugins like plugins/docker or plugins/slack?

A plugin has no automatic GitHub equivalent, so it becomes a placeholder step that echoes a TODO. Its settings are kept as PLUGIN_* environment variables, the way Drone hands them to the plugin, and the notes suggest an action to use instead, for example docker/build-push-action for plugins/docker or slackapi/slack-github-action for plugins/slack.

Will long IDs, zip codes or decimal values change?

No. Commands are copied character for character, and environment values and plugin settings keep the text you typed, so 8901240544102066246, 00501, 14.50 and yes come out unchanged. Values a YAML reader would turn into a number, boolean or date are quoted in the workflow. $DRONE_* variables inside commands are left as they are; the notes give the GitHub names, such as $GITHUB_RUN_NUMBER for $DRONE_BUILD_NUMBER.

Is my pipeline uploaded anywhere?

No. The conversion runs in your browser and nothing is sent to a server or kept, so a reload starts with an empty editor.

Moving more than one project? There are converters for Travis CI, CircleCI, Bitbucket Pipelines, GitLab CI and Jenkins too.