VID-10459: Replace GitLab CI pipeline with GitHub Actions - #2
Open
znorris wants to merge 3 commits into
Open
Conversation
I trigger pages.yml off workflow_run of the CI workflow so build only runs once the same commit's CI has completed and succeeded, matching GitLab's stage: deploy ordering after stage: test. I also move pages:write and id-token:write to a job-level block on deploy only, so build's bundle install never runs with those scopes ambient. I also correct the ci.yml comment that claimed push-before-PR commits get full CI coverage, which they don't.
znorris
commented
Aug 19, 2026
| @@ -0,0 +1,74 @@ | |||
| name: Pages | |||
Contributor
Author
There was a problem hiding this comment.
These pages will be publicly accessibly. That won't leak any secrets. When we come up with something private, we'll move it over.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I'm replacing the GitLab CI pipeline with GitHub Actions and deleting
.gitlab-ci.yml. There were no other.gitlab/fragments to remove.What each job became
testandlint(bothstage: testin GitLab) are now separate jobs in.github/workflows/ci.yml, each running its ownbundle installagainst the sharedvendor/bundlecache, same as before.lintkeepscontinue-on-error: truein place ofallow_failure: true; I confirmed locally that rubocop currently reports 166 offenses against this repo's empty.rubocop.yml, so it has to stay non-blocking. Both jobs run in aruby:3.4.5container rather than viaruby/setup-ruby, because this repo's Actions policy isallowed_actions: "selected"and that action isn't on the allow-list; pulling a plain image needs no allow-listing and mirrors GitLab's ownimage:mechanism. JUnit output that GitLab ingested natively is now uploaded as a plain artifact, since Actions has no equivalent report ingestion.The
pagesjob (stage: deploy) became.github/workflows/pages.yml, split intobuildanddeployper GitHub's Pages model. I trigger it offworkflow_runof the CI workflow rather than independently onpush, sobuildonly starts once CI has completed for the same commit and only proceeds if it succeeded, reproducing GitLab's stage ordering (stage: deployonly started once everystage: testjob succeeded;lint'sallow_failure: truemeant it never blocked that gate).buildchecks outgithub.event.workflow_run.head_sharather than the branch tip, so it builds the exact commit CI tested.pages: writeandid-token: writeare scoped to thedeployjob only, not the workflow level, sobuild, which runsbundle installagainst a lockfile-resolved dependency tree, never holds either scope.Behavior that deliberately differs from GitLab
pushis scoped tomain, andpull_requestcovers everything else. This avoids GitLab's duplicate pipelines, where a push to a branch backing an open merge request produced two runs for the same commit (if: $CI_COMMIT_BRANCHORif: $CI_PIPELINE_SOURCE == "merge_request_event", with no dedupe). The cost is a gap GitLab didn't have: a commit pushed to a branch before any PR is opened for it runs no CI until a PR exists. I'm accepting this because it matches the trigger shape already established insv-cloud'sci.yml.kubernetes-operators-style container decisions don't apply here since there's no deploy job, but for completeness: this repo'stest/lint/buildjobs run in a bareruby:3.4.5container image rather than via a setup action, for the allow-list reason above, not for any security tradeoff.What has to exist before this runs
This repo has never had GitHub Pages enabled (
has_pages: false;GET /repos/ScoreVision/pug-client-ruby/pagesreturns 404).actions/deploy-pagescalls the Pages Deployments API, which requires a Pages site already provisioned withbuild_type=workflow; it does not create one. Until a repo admin turns that on (Settings, Pages, Build and deployment, Source: GitHub Actions), thedeployjob inpages.ymlwill fail even thoughbuildsucceeds.ci.ymland thetest/lintjobs have no external dependency and are runnable as soon as this merges.