Continuous integration and develop publishing¶
This page covers ci.yml, runner-compatibility.yml, develop.yml, the fork pull request policy, and gate troubleshooting. Release and publish workflows are in Releases; security scans are in Security scanning.
ci.yml¶
Purpose:
- run the repository test suite for all branches and pull requests
Triggers:
- push to any branch (tags do not start it)
- pull request targeting any branch
Behavior:
- fails early on fork pull requests that do not carry the
approved-for-cilabel (thegatejob, see Fork pull request policy) - uses
./.github/actions/suite-teststo set up Python, Go, and Lua (installed through APT), sync the Python workspace, and run the suite; theenable_cache: trueinput controls only theuvdependency cache — the action always runs with the Go cache off - runs tests with
make test - builds the documentation with
make build-docs. The build is strict, so a broken link, a broken anchor, or a page missing from the navigation fails the job;make build-docschecks the navigation first and then runs the Zensical build. It reuses theuvenvironment thatsuite-testsset up - summarizes the test and documentation-build commands and the final job status
Permissions:
- top-level
contents: read
runner-compatibility.yml¶
Purpose:
- check the repository test suite on the pinned Ubuntu image and the next Ubuntu image
Triggers:
- weekly schedule (
30 3 * * 1) - manual dispatch
Behavior:
- runs the shared repository test action on
ubuntu-24.04andubuntu-26.04 - keeps both matrix jobs independent: one image failing does not cancel the
other (
fail-fast: false) - uses no secrets and has read-only contents permission
- writes a summary for each matrix job
develop.yml¶
The develop channel is the pre-release build of the platform: the
develop-tagged images and the <VERSION>-develop Helm chart. Deploy it to a
local development cluster or a staging environment to test a change before
production. It is not a supported release.
Purpose:
- publish
develop-tagged images and the<VERSION>-developHelm chart to the develop channel. The workflow runs only by manual dispatch, and the dispatcher selects the source branch. TheSecurityworkflow is advisory and does not block publishing
Triggers:
workflow_dispatchwith a requiredbranchinput: the branch to build the develop images and Helm chart from. Dispatch the workflow frommainand select the source branch in the input
Behavior:
- the
check-gatejob first stops a run whose ref is notrefs/heads/main. GitHub runs the workflow file from the selected ref, so only themaincopy is authoritative. This step gives an early, clear error. The main-only deployment branch policy of thedevelop-publishenvironment is the control that enforces it, because a branch can change its own copy of the workflow check-gatethen makes sure thatECCR_USERNAMEandECCR_PASSWORDare not repository or organization secrets. The job has no environment, so it sees only those shared secrets. If it sees a value, it fails and tells you to move the value to the environment. It reads the secrets only for this check, before it checks out any code- the workflow does not run the tests again;
ci.ymlruns on every push to every branch check-gateruns onubuntu-24.04. It checks outmain(no persisted credentials) and loads./.github/actions/check-ci-gatefrom that checkoutcheck-gatereads the head of the source branch and the latestpushrun ofci.ymlfor that commit in this repository. The run must becompletedwith the conclusionsuccess. A newer failed or unfinished run takes precedence over an older successful run. A fork branch or a pull-request run never satisfies this checkcheck-gatealso reports the latestSecurityrun for the commit (push, pull request, or manual dispatch). This result is advisory and does not block publishing.Securityruns on pushes tomainand on pull requests tomain. To scan another branch before you publish it, dispatch theSecurityworkflow on that branch- if a check fails,
check-gatewrites the reason as a notice and the publish job is skipped. If an API request forCIfails,check-gatefails. If the advisorySecurityrequest fails, the summary showsunknown - the
check-gatesummary shows the requester, the source branch, the commit, theCIandSecurityresults, and a link that compares the commit withmain. The reviewer reads the summary and the compared changes before approving - the
build-push-devjob belongs to thedevelop-publishenvironment. The environment holds the registry credentials. Required reviewers on that environment are the permission control: they decide, per run, whether the publish may start build-push-devuses thedevelop-publishconcurrency group, so only one publish runs at a timebuild-push-devchecks outmainin the workspace root. All local actions (the gate recheck, the credential preparation, and the summary) come from that trusted checkoutbuild-push-devthen runs the same gate check again. If the branch head moved in the meantime, the job fails with a clear message and publishes nothing; dispatch again to publish the new head- uses the GitHub-hosted runner
ubuntu-24.04 - uses
./.github/actions/prepare-publishingto install GNU Make when needed, resolve credentials, and log in to Docker and Helm - uses the provided ECMWF container registry (ECCR) credentials when both values are set; otherwise, retrieves credentials from Vault and keeps each provided value in preference to its Vault value
- validates and masks the resolved credentials, then passes action outputs to Docker and Helm without exporting credentials to the job environment
- checks out the source commit in the
source/directory, and runsmake publish-developin that directory. The chart version is<VERSION>-develop, whereVERSIONis theVERSIONfile of the source branch - summarizes the requester, the source branch, the published commit, and the final job status
Trust model:
- the
CIresult of a branch other thanmainshows only that theci.ymlof that branch passed. The branch can change its ownci.yml, so for such a branch the result is not a security control - the build step runs the
Makefileand Dockerfiles of the source branch after the registry login. That code can read the registry credentials. The required-reviewer approval of thedevelop-publishenvironment is the control that makes this acceptable. Keep the reviewer list to platform maintainers, and approve only after you read the compared changes - no branch is special: any branch whose head has a green
CIpush run in this repository can feed the develop channel. A published run replaces thedevelopimages and the<VERSION>-developchart
Setting up the develop channel¶
- In repository Settings, create the
develop-publishenvironment (Settings, Environments). - Add required reviewers, and select Prevent self-review. Any user with write access can dispatch a run, but nothing is published until a different reviewer accepts the pending deployment.
- Set Deployment branches and tags to Selected branches and tags, and add only the
mainbranch. A copy of the workflow on another branch then cannot use the environment. - Add
ECCR_USERNAMEandECCR_PASSWORDas environment secrets ofdevelop-publish. Delete the repository and organization secrets with these names: every workflow on every branch can read a shared secret, and the workflow fails while one exists.
Permissions:
- top-level
contents: read check-gate:actions: readandcontents: read. It reads the branch head, theCIruns, and theSecurityruns through the APIbuild-push-dev:actions: readfor the gate recheck,contents: readfor checkout, andid-token: writefor Vault authentication
Credential inputs:
ECCR_USERNAMEECCR_PASSWORD
Set both values as develop-publish environment secrets. The credential action does not read repository variables. If either value is missing, it uses Vault with GitHub OpenID Connect (OIDC) authentication. Both resolved values must be set before registry login. The Vault endpoints are accessible only from the ECMWF internal network, so the GitHub-hosted runner cannot use them. With an environment, the OIDC subject claim is repo:ecmwf/ecmwf-sites:environment:develop-publish; bind a Vault role to that claim.
Gate troubleshooting¶
The shared gate action writes Starting the CI gate. before
it loads the gate module. It then logs each API check: the branch
head and the CI push runs. The Release workflow uses
the same action for main.
A notice that starts with Publishing is blocked is not an action failure.
It means that the required CI run has not passed for the branch head
commit, or the commit is no longer the branch head. The gate returns
ready: false, and publishing is skipped.
A module-load or API error fails the action and sets no ready output.
The error identifies the operation and includes the HTTP status when
available. For an HTTP 403 response from the workflow-runs API, check that
the calling job has actions: read.
If the log has only the action inputs and no startup message, inspect the
job annotations and runner logs. The gate code might not have started.
Do not change the publishing conditions to bypass the failure. Merge
changes to main before testing a new dispatch: GitHub runs the workflow
file of the dispatched ref, and only the main copy is allowed to publish.
Fork pull request policy¶
The repository does not use pull_request_target.
Instead, ci.yml and security.yml start with a gate job that calls the reusable workflow external-pr-gate.yml. Every other job of those workflows needs the gate job, so no job runs repository code before the gate passes. The reusable workflow has no checkout, no secret, and no token permission. It has two jobs:
labelfails with an error annotation that names theapproved-for-cilabel when a PR comes from a fork and does not have that label. Every job that needsgateis then skipped.approveruns only for fork PRs. It uses theexternal-pull-requestenvironment, so the protection rules of that environment decide when the run continues.
Notes:
security.ymlstarts a new run when the label is applied, because it listens for thelabeledeventci.ymluses the default pull-request event types, so re-run that workflow after you apply the label- Add the check
External pull request gate / Check approved-for-ci labelto the required status checks of the protected branches. A job that a failedgatejob skipped is not a failure for branch protection.
Per-run approval¶
The label stays on the PR after a contributor pushes new commits, so it does not approve the new code. Two GitHub settings give a per-run approval:
- In the
external-pull-requestenvironment (Settings, Environments), add required reviewers. Theapprovejob then waits for a reviewer on each run of a fork PR. Without reviewers, the environment allows the run and only the label applies. - In Settings, Actions, General, set the approval for fork pull request workflows to Require approval for all external contributors. GitHub then asks for approval before it starts any workflow of a fork PR, and this is the only control that a PR cannot change. A fork PR can change the workflow files that it runs, so the label gate and the environment are a safeguard and not a security boundary.
This policy currently applies to:
ci.yml- all jobs in
security.yml