Skip to content

Image to ECR through OIDC, with a SOCI index #27

Closed

Description

@sodre

Parent

#18

What to build

The runner image reaches private ECR, so Fargate can lazy-load it (ADR-0002). The stack gains three things:

  • an ECR repo with a lifecycle rule that keeps the last 4 images;
  • GitHub's OIDC provider, created only when the ExistingOidcProviderArn parameter is empty, following zeroae/foresight's github-deploy-zae.json;
  • an image-push role, trusted only for repo:zeroae/ci-runner:ref:refs/heads/main and allowed only to push to that repo.

On main, image.yml then assumes that role and pushes both architectures to ECR with a SOCI v2 index made by soci convert, under :latest and the date/sha tag. It keeps pushing to GHCR, which EC2 runners still use.

Deploy with the permission set chosen in "Gate: account quotas and OIDC permissions", following the naming and boundary rules it recorded.

Acceptance criteria

  • After a main build, ECR holds a multi-arch :latest whose image index carries a SOCI v2 index.
  • A run on any other branch, or from another repo, can't assume the push role.
  • The lifecycle rule keeps 4 images.
  • A deploy into an account that already has GitHub's provider reuses it.
  • docs/stack.md and the runbook cover the repo and the role, and say there is nothing to rotate: no stored keys or tokens.

Activity

  1. added a commit that references this issue on Nov 14, 2026
  2. sodre commented on Nov 14, 2026

    @sodre
    MemberAuthor

    Live: the stack deploy reused the existing OIDC provider (no second one). The first main run's push was refused: this repo uses GitHub's immutable OIDC subject, fixed in b28303f (trust repo:zeroae@11018406/ci-runner@1455021495:ref:refs/heads/main); that redeploy also proved iam:UpdateAssumeRolePolicy under ZAEPowerUserAccess. Re-run https://github.com/zeroae/ci-runner/actions/runs/43541912036 green: ECR :latest and :20261114-04c2a25 hold amd64 and arm64 manifests plus a SOCI v2 index for each.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    ready-for-agentFully specified, ready for an AFK agent

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions