Skip to main content
Learn how to seamlessly migrate your existing Jenkins jobs into GitHub Actions workflows using the GitHub Actions Importer CLI extension. This guide walks you through installation, configuration, and execution, so you can automate CI/CD with GitHub’s native tooling.

Table of Contents

  1. Prerequisites
  2. Install GitHub CLI & Importer
  3. Authenticate GitHub CLI
  4. Generate and Configure Tokens
  5. Configure the Importer
  6. Update the Importer
  7. Dry-Run a Pipeline Migration
  8. Migrate to GitHub Actions
  9. Verify the Workflow
  10. Conclusion & References

Prerequisites

Before starting the migration, ensure you have the following resources in place:
The importer cannot migrate scripted pipelines, secrets, or unknown plugins. Make sure your Jenkins jobs use declarative pipelines or simple freestyle jobs.
The image shows a GitHub documentation page about migrating from Jenkins to GitHub Actions using the GitHub Actions Importer. It includes prerequisites, limitations, and installation instructions for the CLI extension.

Install GitHub CLI & Importer

On Debian/Ubuntu

Add the Actions Importer Extension

Verify the installation:

Authenticate GitHub CLI

Login interactively to GitHub:
Follow the browser prompts to complete authentication.
The image shows a GitHub authorization page where the GitHub CLI is requesting access to a user's account, with options to authorize or cancel the request. Various permissions and organization accesses are listed.

Generate and Configure Tokens

1. GitHub Personal Access Token (Classic)

  1. Navigate to Settings → Developer settings → Personal access tokens → Tokens (classic)
  2. Click Generate new token, name it (e.g. jenkins-importer), and select the workflow scope
  3. Copy the token for later use
The image shows a GitHub settings page for creating a new personal access token, with various scopes and options selected. The note field indicates "jenkins-importer," and a message states that the note has already been taken.

2. Jenkins API Token

  1. Sign in to Jenkins and go to Manage Jenkins → Users
  2. Select your user and click Configure
  3. Under API Token, select Add new Token, name it (e.g. GitHub Importer), then generate and copy it
The image shows a Jenkins dashboard interface with a list of build jobs, their statuses, and options for managing Jenkins projects. The sidebar includes navigation options like "Build History" and "Manage Jenkins."
The image shows a Jenkins user configuration page with fields for full name, description, and API token management. The interface includes options to save or apply changes.
The image shows a configuration screen for a user named "siddharth" with sections for description and API tokens. It includes options to add new tokens and a warning about copying tokens securely.

Configure the Importer

Run the configuration command:
When prompted, enter:
  • GitHub Personal Access Token
  • GitHub Base URL: https://github.com
  • Jenkins Personal Access Token
  • Jenkins Username
  • Jenkins Base URL (e.g. http://your.jenkins.server:8080)
Successful output:

Update the Importer

Keep your extension up-to-date:
Example output:

Dry-Run a Pipeline Migration

Preview the generated workflow YAML locally without pushing changes:
On success, inspect the file:

Migrate to GitHub Actions

Generate a pull request with the new workflow files:
This command creates a PR in the target repository for review and merge.
The image shows a GitHub repository page titled "jenkins-to-actions," with an initial commit made 16 minutes ago. The repository is public and contains a README file.
The image shows a GitHub pull request page titled "Convert Generate_ASCII_Artwork to GitHub Actions," with details about the commit and options to merge the request.
Merge the PR to apply the workflow to the main branch.

Verify the Workflow

After merging, trigger the workflow manually or via push. Monitor runs in the Actions tab:
The image shows a GitHub Actions interface with a list of workflow runs, including "Update generate_ascii_artwork.yml" and "Generate_ASCII_Artwork," displaying their status and details.

Conclusion & References

The GitHub Actions Importer CLI accelerates the transition from Jenkins to GitHub’s CI/CD platform. For full details, visit the official documentation.
Enjoy seamless pipeline migration and take advantage of GitHub Actions for robust workflow automation.
The image shows a GitHub documentation page about migrating from Jenkins to GitHub Actions using the GitHub Actions Importer. It includes a sidebar with navigation links and a section detailing prerequisites for the migration process.

Watch Video