Conversation
The gem has never reached RubyGems. v0.2.0 and v0.3.0 were both tagged and
released, and publish.yml has not run once:
$ gh run list --workflow=publish.yml
(no runs)
$ curl https://rubygems.org/api/v1/versions/docker-api-ng.json
This rubygem could not be found.
release-please pushes its tag with the default GITHUB_TOKEN, and GitHub
does not start workflow runs from events that token creates -- that is the
documented guard against recursive runs. publish.yml listened on
`push: tags: ["v*"]`, so it could never fire for the only thing that
creates those tags. Both releases show github-actions[bot] as the author,
which is the tell.
Moving the publish into the same workflow sidesteps the token: the job is
gated on the action's release_created output rather than on an event. No
PAT, so trusted publishing stays secretless.
The checkout pins ref: to the tag release-please just created, so the gem
is built from the released commit rather than from whatever main has moved
to since. Permissions are now per-job: release-please keeps contents:write
and pull-requests:write, publish gets only contents:read plus the
id-token:write that OIDC needs.
Needs a matching change on RubyGems: trusted publishing identifies the
workflow by filename, so the publisher has to name release-please.yml.
Signed-off-by: Tim Smith <tim@mondoo.com>
|
Claude is half right. You can start workflows from GitHub tokens, you just need to enable it. |
damacus
requested changes
Aug 25, 2026
damacus
left a comment
There was a problem hiding this comment.
I think this is only a settings page change?
It works everywhere else without this
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The gem has never been published. Two releases exist and
publish.ymlhas not run once.Why
release-please pushes its tag using the default
GITHUB_TOKEN. GitHub deliberately does not start workflow runs from events that token creates — it is the documented guard against a workflow triggering itself forever.publish.ymllistened on:…so it could never fire for the only thing that creates those tags. Both releases show
github-actions[bot]as the author, which is the tell.The fix
The publish job moves into
release-please.yml, gated on the action'srelease_createdoutput rather than on an event. That sidesteps the token question entirely — no PAT, so trusted publishing stays secretless.Two details worth calling out:
ref:to the tag release-please just created, so the gem is built from the released commit rather than from whatevermainhas moved to in the meantime. The old workflow got this for free from the tag trigger; gating on an output means asking for it explicitly.release-pleasekeepscontents: write/pull-requests: write;publishgets onlycontents: readplus theid-token: writethat OIDC needs. The workflow default drops tocontents: read.publish.ymlis deleted — it cannot fire, and leaving it would mean two workflows able to publish, which means two trusted publishers to keep configured.Trusted publishing identifies the workflow by filename, so the publisher must name
release-please.yml— notpublish.yml. Which flow to use depends on whether 0.3.0 gets pushed by hand first.If the gem is still unpublished — use the pending publisher flow:
RubyGems.org → profile → Trusted Publishers → Create
docker-api-ngtest-kitchendocker-api-ngrelease-please.ymlrubygemsIt converts to a normal trusted publisher after the first successful push.
If 0.3.0 has already been pushed manually — the gem exists, so add the publisher to it instead: gem page → Trusted Publishers → Create, same fields minus the gem name.
Publishing 0.3.0 itself
This change only takes effect for the next release — 0.3.0 is already tagged, so its
release_createdmoment has passed. Either let 0.3.1 carry the first automated publish, or push 0.3.0 by hand once:Pre-flight on that artifact: builds at 78,848 bytes, installs into a clean
GEM_HOME, requires, and drives a request throughTransport::Fakeend to end. Neither this PR nor #30 touches a packaged file —.github/andspec/are not inspec.files— so merging them later does not change what 0.3.0 would ship.Verification
YAML parses; job graph is
release-please → publishwith the gate onneeds.release-please.outputs.release_created == 'true'.bundle exec rake— 360 runs, 0 failures. I cannot exercise the publish path without cutting a real release, so the trusted-publisher step above is the part to check by eye.