Log in from GitHub Actions
A GitHub Actions job logs in to your namespace with no secret or API key stored in GitHub. The job proves who it is with the identity token GitHub issues to it. Orkestia checks that token against your organization's GitHub App installation and its CI access rules, and returns a registry token for your namespace, valid for one hour.
The repository must belong to the GitHub organization connected to your Orkestia organization.
Add the step
Give the job permissions: id-token: write and add one step, orkestia/registry-login@v1:
permissions:
id-token: write # lets GitHub issue the job's identity token
contents: read
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: orkestia/registry-login@v1
id: orkestia
- run: |
docker build -t ${{ steps.orkestia.outputs.registry }}/api:${{ github.sha }} .
docker push ${{ steps.orkestia.outputs.registry }}/api:${{ github.sha }}
It works the same on GitHub-hosted runners, on your own runners, and on Orkestia runners.
What the step sets up
| Tool | After the step |
|---|---|
| Docker, buildx | docker login registry.orkestia.dev is done, with your namespace as the username |
| pip, uv | Requests to packages.orkestia.dev are authenticated for this job. Point them at your index: pip install --extra-index-url "${{ steps.orkestia.outputs.pip-index-url }}" my-package |
| twine, uv publish | Use the outputs: twine upload --repository-url "${{ steps.orkestia.outputs.pip-upload-url }}" -u "$ORKESTIA_NAMESPACE" -p "$ORKESTIA_TOKEN" dist/* |
| npm | Packages in the @<namespace> scope resolve from and publish to your namespace. Other packages still come from the public registry |
The token is also exported to later steps as ORKESTIA_TOKEN, with the username in ORKESTIA_NAMESPACE. Nothing is written to the home directory except the Docker login. The pip and npm settings live in the job's temporary directory, which the runner empties after the job.
How it works for each tool:
- pip and uv read a
netrcfile the step writes forpackages.orkestia.dev, and the step pointsNETRCat it. Entries you already had in~/.netrcfor other hosts are kept. - npm reads the user
.npmrcthatNPM_CONFIG_USERCONFIGnames. The step adds two lines to it,@<namespace>:registry=https://packages.orkestia.dev/<namespace>/npm/and//packages.orkestia.dev/<namespace>/npm/:_authToken=${ORKESTIA_TOKEN}, so the token itself is never written to the file. Ifactions/setup-nodealready created a user.npmrc, the step adds to that one. Runactions/setup-nodebefore the login step. If it runs after the login step withregistry-url, it points npm at a new file without these lines. - Docker is logged in with
docker login, so buildx anddocker/build-push-actionuse it too.
A CI token can pull, or pull and push. It cannot delete: delete images with a one-hour password.
Inputs
| Input | Default | |
|---|---|---|
scope | empty | pull, push, or empty for the widest access the job is allowed |
docker | true | Run docker login when Docker is installed |
python | true | Authenticate pip and uv to the package index for this job |
npm | true | Map the @<namespace> scope to your npm registry for this job |
exchange-url | Orkestia's | Leave the default |
A job that only reads can ask for less:
- uses: orkestia/registry-login@v1
with:
scope: pull
scope: push makes the step fail when the job may only pull, instead of failing later at the push.
Outputs
| Output | Example |
|---|---|
namespace | acme |
scope | push |
registry | registry.orkestia.dev/acme |
pip-index-url | https://packages.orkestia.dev/acme/simple/ |
pip-upload-url | https://packages.orkestia.dev/acme/ |
npm-registry | https://packages.orkestia.dev/acme/npm/ |
Jobs longer than an hour
The token is valid for one hour. Run the step again before a push that starts later than that. The action's README also describes a Docker credential helper that fetches a fresh token whenever Docker needs one.
On Orkestia runners
Jobs on Orkestia runners reach registry.orkestia.dev and packages.orkestia.dev over a private network path, automatically. There is nothing to configure and the hostnames are the same. Usage shows that traffic as the private network path.
Who can push
Until an organization admin sets rules of their own, these defaults apply:
Every repository of the organization's GitHub installation may pull. Push only from a tag, a GitHub environment, or the repository's default branch, on push, release, workflow_dispatch, schedule or merge_group events. Pull requests only pull.
A pull request from a fork never gets a token: GitHub does not issue one to it.
Your own rules
Organization owners and admins manage the rules in Cockpit, in the CI trust rules section of Registry → Images, or with these workflows. Members can read them:
| Workflow | Who | What it does |
|---|---|---|
identity.federation.trust-list | The organization | Lists the rules, or says the defaults apply and what they are |
identity.federation.trust-set | Admin | Adds a rule, or replaces the rule with the same name |
identity.federation.trust-remove | Admin | Removes a rule by name |
A rule has these fields:
| Field | Meaning |
|---|---|
name | Unique in the organization: 1 to 64 lowercase letters, digits and hyphens |
access | pull or push (push also pulls) |
repositories | Optional. GitHub's numeric repository ids, not names, so renaming a repository cannot take over a rule. Omitted: every repository of the installation |
refs | Optional. Ref globs, for example refs/heads/main or refs/tags/v*. Omitted: any ref |
environments | Optional. GitHub environment names. Omitted: with or without an environment |
events | Optional. GitHub event names, for example push, release, workflow_dispatch. A push rule with no events gets push, release, workflow_dispatch, schedule and merge_group |
workflows | Optional. job_workflow_ref globs, for example my-org/repo/.github/workflows/release.yml@refs/heads/main |
How the rules apply:
- Setting the first rule replaces the defaults. Removing the last rule brings the defaults back.
- A job gets the widest
accessamong the rules it matches. A job that matches no rule is refused. - A pull request never pushes, whatever a rule says. A
pushrule cannot name pull request events. trust-setreturns a warning when apushrule is broad, for example any branch, or events that people outside your organization can trigger.
For example, push only from version tags of one repository:
identity.federation.trust-set
name release-tags
access push
repositories [123456789]
refs ["refs/tags/v*"]
Remember that this first rule replaces the defaults, so add a pull rule as well if your other repositories still need to pull.
If the login is refused
The step prints orkestia: login refused (<error>: <reason>) and fails. The most common ones:
| Printed | Fix |
|---|---|
this job cannot request a GitHub identity token | Add permissions: id-token: write to the workflow or the job. A pull request from a fork always gets this, because GitHub never issues it a token |
invalid_grant: no organization is federated for this repository owner | The repository's GitHub organization is not the one connected to your Orkestia organization |
invalid_target: the organization has no active registry | Turn the registry on, or on again |
access_denied: no trust rule admits this job | Your organization has its own rules and none matches this job |
invalid_scope: this job may pull, not push | The step asked for scope: push but the job may only pull, for example in a pull request |
limit_exceeded: ... | A limit was reached. The text names it |
Every message, with what Docker, pip, twine and npm print after a refused login, is on Troubleshooting.
When a limit has paused pushes, a job that leaves scope empty gets pull instead of failing, and only its push fails later. Set scope: push on publishing jobs to fail at the login, with the limit named.
Next
- CI recipes: complete workflows for images, Python packages and npm packages.
- Build cache: reuse layers between runs.
Orkestia Registry
Container images at registry.orkestia.dev and Python and npm packages at packages.orkestia.dev, in one namespace per organization, with a one-hour login.
Limits and usage
Orkestia Registry has no quota. Hard limits stop runaway usage and can be raised, and Cockpit and Lumen show usage per service.
