This site requires JavaScript to be enabled

Migrating from GitLab to GitHub - GitLab CI/CD to GitHub Actions

341 views

Article Intended For

Penn State faculty, staff, and students who are currently using Penn State GitLab instance and is getting ready to migrate to Penn State's GitHub Service.

Introduction

When migrating from GitLab CI/CD to GitHub Actions, you want to ensure a smooth transition while maintaining the functionality you rely on in your pipelines. This article provides an introduction to GitHub Actions, a high-level comparison of common GitLab CI/CD features—such as variables, secrets, artifacts, caching, scheduled jobs, security scanning, and container image management—and their equivalents in GitHub Actions, and some migrations methods available.

Please note: GitHub Actions usage is free for standard GitHub-hosted runners in public repositories, and for self-hosted runners. Penn State's GitHub account offers a limited number of GitHub-hosted runner minutes per month for private repositories.  If you believe your GitHub Actions may use more than 30 minutes per month, and you do not wish to use self-hosted runners, please contact us about billing options.

Getting Started

If you are new to GitHub Actions, it may be worthwhile to learn more about them before migrating your GitLab CI/CD pipelines to GitHub Actions.  Here are some guides, tutorials, and example use cases to introduce you to GitHub Actions.

Common Features

Below is a list of features that are commonly used in GitLab CI/CD and their equivalents in GitHub Actions. If you can't find the feature you are interested in migrating, please consult GitHub Action documentation.

Variables
In GitHub Actions, these are called Environment Variables. They can be defined in workflows or at repository/organization levels.  Learn more about variables in these GitHub articles:


Secrets
GitHub Actions supports Secrets, which can be securely stored and used in workflows. Learn more about secrets in this GitHub articles:


Artifacts
In GitHub Actions, Artifacts can be used to persist data between jobs or make files available after a workflow completes. Learn more about artifacts in these GitHub articles:


Caching
GitHub Actions provides Cache Actions to speed up workflows by caching dependencies and build outputs. Learn more about caching in these GitHub articles:


Event Triggers and Scheduled Jobs
GitHub Actions supports Event triggers, such as push, pulls, etc, and Scheduled Events using cron syntax for running workflows. Learn more about the event triggers in these GitHub articles:


Security Scanning
GitHub offers Code Scanning and Secret Scanning through its Security features, along with integration for third-party security tools. Learn more about security scanning in these GitHub articles:


Packaging and Pushing to a Private Docker Repository
GitHub Actions can integrate with Docker and container registries, such as GitHub Container Registry or Docker Hub.  Learn more about packaging and publishing in these GitHub articles:


Releases
In GitHub Actions, Releases can be created automatically as part of a workflow to manage and package project distributions. Learn more about packaging and publishing in these GitHub articles:

Runners
GitHub Actions uses Runners to execute workflows, similar to GitLab Runners. GitHub provides both hosted and self-hosted runners. 

Please note: GitHub Actions usage is free for standard GitHub-hosted runners in public repositories, and for self-hosted runners. Penn State's GitHub account offers a limited number of GitHub-hosted runner minutes per month for private repositories.  If you believe your GitHub Actions may use more than 30 minutes per month, and you do not wish to use self-hosted runners, please contact us about billing options.

Migration Tools and Troubleshooting

GitHub provides tools to automate the migration process from GitLab CI/CD to GitHub Actions, helping you streamline the transition. They also provide guides on manual migrations, troubleshooting and best practices.  Check out these GitHub articles on these processes:

Previous Penn State GitLab Customers noted the following nuances when migrating to the Penn State GitHub service.  We've linked to the GitHub Community discussions regarding these issues.

Additional Information

Migrating from GitLab to GitHub - Getting Started

Migrating from GitLab to GitHub - Frequently Asked Questions

Signing up for Penn State's GitHub Service

Penn State GitHub Frequently Asked Questions

GitHub Glossary