How to Convert Drone CI to GitHub Actions - Step by Step Guide
Input Your Drone CI Configuration
Start with your existing .drone.yml file, the whole thing, including every pipeline separated by ---:
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_requestHow the Pieces Are Mapped
The converter rewrites your Drone pipeline like this:
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 testReview and Customize
The comment block at the top of the output is your to-do list:
Add the Workflow to Your Repository
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.
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
CircleCI to GitHub Actions
Convert CircleCI config.yml to GitHub Actions workflows with jobs, caching, and artifacts
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