Skip to content

feat(quay-login): add Quay OIDC login action - #2

Open
SDAChess wants to merge 3 commits into
mainfrom
feat/quay-login-action
Open

SDAChess wants to merge 3 commits into
mainfrom
feat/quay-login-action

Conversation

@SDAChess

@SDAChess SDAChess commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

Why

The org is moving images and charts to Quay, and infra wants no stored registry secret. ai-openshell/console#134 does this with scripts/quay-login.sh. This turns it into a reusable action so every repo can use it.

What

quay-login asks GitHub for the job's OIDC token and trades it at https://quay.io/oauth2/federation/robot/token for a robot token that lasts one hour. It then logs in the clients the caller asks for:

permissions:
  id-token: write
steps:
  - uses: ai-openshell/workflows/quay-login@main
    with:
      robot: ai-openshell+console_release
      clients: docker helm   # any of docker, podman, helm; default docker

Compared with the bash script:

  • It's a node24 action with no dependencies, using built-in fetch. No curl or jq.
  • Clients are requested explicitly, and podman is supported. A requested client that isn't installed fails the step; the script skipped helm silently.
  • Unknown client names and a missing id-token: write fail before any network call, with a clear ::error::.
  • audience is URL-encoded rather than appended as raw text.
  • Both tokens are masked, and passwords reach the clients only through stdin.
  • The registry is fixed at quay.io for now.

Also in this PR:

  • flake.nix: a devShell with Node 24 (nix develop).
  • test.yml: a lint job that runs prettier --check and node --check on the action.

Not yet

  • No unit tests and no Quay push smoke test. The smoke test would need an environment that same-repo PRs can't use, so it's left out for now.
  • Error handling is happy path only. TODOs mark the spots for a failed GitHub token request and a missing client binary.

Testing

Locally: prettier --check . and node --check pass. An unknown client and a missing OIDC token each fail with the expected error.

The real exchange and logins haven't run yet. They need a job that a Quay robot trusts, such as console's release environment using ai-openshell/workflows/quay-login@feat/quay-login-action.

Signed-off-by: Simon Scatton <sscatton@nvidia.com>
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
Signed-off-by: Simon Scatton <sscatton@nvidia.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant