fix(ci): restore registry host and define REGISTRY_OWNER in OCI build #51
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/oci-build-registry-owner-env"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
build-oci-image.ymlfailed on push tomain(run #128) at the "Set environment variables" Nushell step withCannot find column REGISTRY_OWNER. The step ranlet owner = $env.REGISTRY_OWNER, but the jobenv:block never definedREGISTRY_OWNER. It exposedREGISTRY_PROVIDER,REGISTRY_USER, andREGISTRY_PASSWORDonly.A second latent bug rode along: commit
4a2e51chad repointedREGISTRY_PROVIDERfrom the registry host (dev.a8n.run) tovars.A8N_TOOLS_PRIVATE_PACKAGE_OWNER. So even ifREGISTRY_OWNERhad been defined,IMAGE_REGISTRYwould have resolved toa8n-tools/a8n-toolsanddocker loginwould have targeteda8n-toolsinstead of the registry host.Fix
Restore
REGISTRY_PROVIDERto thedev.a8n.runregistry host and addREGISTRY_OWNERsourced fromvars.A8N_TOOLS_PRIVATE_PACKAGE_OWNER. The org-scoped PAT (secrets.A8N_TOOLS_PRIVATE_PACKAGE_PAT) introduced in4a2e51cis kept.Resulting resolution:
owner = a8n-tools,IMAGE_REGISTRY = dev.a8n.run/a8n-tools,docker logintargetsdev.a8n.run, images push todev.a8n.run/a8n-tools/rusty-links:<tag>.Notes
A8N_TOOLS_PRIVATE_PACKAGE_OWNERis an org-level variable; repo-level variables are empty. Its value is the package owner (a8n-tools) per its name and the run URL.