Skip to content

Authenticate release workflow to Cloudsmith via OIDC#70

Draft
jmeredithg wants to merge 2 commits into
mainfrom
jm/cloudsmith-oidc-test
Draft

Authenticate release workflow to Cloudsmith via OIDC#70
jmeredithg wants to merge 2 commits into
mainfrom
jm/cloudsmith-oidc-test

Conversation

@jmeredithg

Copy link
Copy Markdown

What

Test PR for the Cloudsmith migration effort. Repoints the gem push step from RubyGems to Cloudsmith, using the same GitHub OIDC -> Cloudsmith token exchange pattern already merged and working in Gusto/virtuous-pdf#452.

Changes

  • Add permissions: id-token: write (required to mint the OIDC token).
  • Add a step authenticating to Cloudsmith via cloudsmith-io/cloudsmith-cli-action@v2 (oidc-auth-only: "true"), which exchanges the GitHub OIDC token for a short-lived Cloudsmith token and exports it as CLOUDSMITH_API_KEY — no static secret needed.
  • Change "Push to RubyGems" -> "Push to Cloudsmith": gem push fixture_kit-*.gem --host https://ruby.cloudsmith.io/gusto/gusto, authenticated via GEM_HOST_API_KEY="Bearer ${CLOUDSMITH_API_KEY}" (Cloudsmith's documented format for RubyGems pushes).
  • Left the old secrets.RUBYGEMS_API_KEY reference removed since it's no longer used; the secret itself can be cleaned up from repo settings separately once this is confirmed working.
  • Left the "Upload gem to release" step untouched — unrelated to the registry migration.

Why this repo first

Marked as a test case: this is a near-exact analog of the already-merged virtuous-pdf fix (plain gem push, no bundle install step to also repoint), so it's the lowest-risk way to confirm the pattern works before rolling it out to the rest of the RubyGems/npm/NuGet/Docker repos identified in the Cloudsmith migration audit.

Opened as draft — holding for a real release run (or manual dispatch, if you'd like me to add a workflow_dispatch trigger) to confirm the push actually succeeds against Cloudsmith before merging.

Push the gem to Cloudsmith (ruby.cloudsmith.io/gusto/gusto) instead of
RubyGems, using the same GitHub OIDC -> Cloudsmith token exchange
pattern merged in Gusto/virtuous-pdf#452.
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