CI/CD Translation Reference
Mapping GitLab CI concepts and patterns to GitHub Actions equivalents. Use alongside gh actions-importer for automated translation, then review and adjust using this reference.
Pipeline Structure​
| GitLab CI | GitHub Actions | Notes |
|---|---|---|
.gitlab-ci.yml | .github/workflows/*.yml | GitHub supports multiple workflow files |
stages: | Jobs with needs: dependencies | No explicit stage ordering; use needs: for DAG |
extends: | Reusable workflows / composite actions | uses: ./.github/workflows/reusable.yml |
include: | Reusable workflows | uses: org/repo/.github/workflows/shared.yml@main |
needs: | needs: | Same concept, same keyword |
resource_group: | concurrency: groups | concurrency: { group: ..., cancel-in-progress: false } |
environment: | environment: | Same concept; GitHub adds protection rules |
Docker & Services​
| GitLab CI | GitHub Actions | Notes |
|---|---|---|
image: | runs-on: + container: | runs-on selects the runner; container sets the Docker image |
services: | services: in container jobs | Requires container: on the job; services don't work on bare runners |
macOS runners (saas-macos-medium-m1) | runs-on: macos-14 | M1-based, available on Enterprise |
pages job | actions/deploy-pages or Cloudflare Pages | See docs hosting section |
Artifacts & Cache​
| GitLab CI | GitHub Actions | Notes |
|---|---|---|
artifacts: | actions/upload-artifact / actions/download-artifact | GitLab passes artifacts between stages automatically; GitHub requires explicit steps |
cache: | actions/cache | Or use built-in caching in setup actions like actions/setup-node with cache: npm |
Variables & Secrets​
| GitLab CI | GitHub Actions | Notes |
|---|---|---|
| CI/CD Variables | Repository/org secrets + variables | Secrets are encrypted; variables are plaintext |
CI_JOB_TOKEN | GITHUB_TOKEN | Auto-generated per workflow run |
CI_REGISTRY / CI_REGISTRY_IMAGE | ghcr.io | GitHub Container Registry |
CI_COMMIT_SHA | github.sha | Context expressions |
CI_COMMIT_REF_NAME | github.ref_name | Context expressions |
CI_PIPELINE_SOURCE | github.event_name | push, pull_request, workflow_dispatch, etc. |
| Protected variables | Environment secrets | Secrets scoped to specific environments |
Triggers & Conditions​
| GitLab CI | GitHub Actions | Notes |
|---|---|---|
rules: / only: / except: | on: triggers + job if: conditions | GitHub triggers are more explicit |
when: manual | workflow_dispatch or environment protection | workflow_dispatch makes the whole workflow manual; for a single job, use env protection |
Gotchas​
Sentry/deploy integration changes
Sentry release tracking and deploy notifications need to be reconfigured for the GitHub integration. Projects moving to Laravel Cloud will transition from Sentry to Nightwatch. Affected repos: farfalla, medusa, farfalla-integrations, coniglio.
Cross-repo triggers
GitLab has built-in cross-project pipeline triggers. GitHub Actions uses repository_dispatch events with a PAT or GitHub App token to trigger workflows in other repos. Affected repos: micelio (triggers criceto), volpe/farfalla (Delfino version validation).