Skip to main content

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 CIGitHub ActionsNotes
.gitlab-ci.yml.github/workflows/*.ymlGitHub supports multiple workflow files
stages:Jobs with needs: dependenciesNo explicit stage ordering; use needs: for DAG
extends:Reusable workflows / composite actionsuses: ./.github/workflows/reusable.yml
include:Reusable workflowsuses: org/repo/.github/workflows/shared.yml@main
needs:needs:Same concept, same keyword
resource_group:concurrency: groupsconcurrency: { group: ..., cancel-in-progress: false }
environment:environment:Same concept; GitHub adds protection rules

Docker & Services​

GitLab CIGitHub ActionsNotes
image:runs-on: + container:runs-on selects the runner; container sets the Docker image
services:services: in container jobsRequires container: on the job; services don't work on bare runners
macOS runners (saas-macos-medium-m1)runs-on: macos-14M1-based, available on Enterprise
pages jobactions/deploy-pages or Cloudflare PagesSee docs hosting section

Artifacts & Cache​

GitLab CIGitHub ActionsNotes
artifacts:actions/upload-artifact / actions/download-artifactGitLab passes artifacts between stages automatically; GitHub requires explicit steps
cache:actions/cacheOr use built-in caching in setup actions like actions/setup-node with cache: npm

Variables & Secrets​

GitLab CIGitHub ActionsNotes
CI/CD VariablesRepository/org secrets + variablesSecrets are encrypted; variables are plaintext
CI_JOB_TOKENGITHUB_TOKENAuto-generated per workflow run
CI_REGISTRY / CI_REGISTRY_IMAGEghcr.ioGitHub Container Registry
CI_COMMIT_SHAgithub.shaContext expressions
CI_COMMIT_REF_NAMEgithub.ref_nameContext expressions
CI_PIPELINE_SOURCEgithub.event_namepush, pull_request, workflow_dispatch, etc.
Protected variablesEnvironment secretsSecrets scoped to specific environments

Triggers & Conditions​

GitLab CIGitHub ActionsNotes
rules: / only: / except:on: triggers + job if: conditionsGitHub triggers are more explicit
when: manualworkflow_dispatch or environment protectionworkflow_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).

X

Graph View