Skip to content

Run publish job on the host instead of in a container#58

Merged
lloeki merged 1 commit into
mainfrom
lloeki/fix-publish-git-ownership
Jun 17, 2026
Merged

Run publish job on the host instead of in a container#58
lloeki merged 1 commit into
mainfrom
lloeki/fix-publish-git-ownership

Conversation

@lloeki

@lloeki lloeki commented Jun 17, 2026

Copy link
Copy Markdown
Member

Why?

The publish job in build.yml failed with fatal: detected dubious ownership in repository at '/__w/libdatadog-rb/libdatadog-rb'. The job ran in a container (ghcr.io/datadog/images-rb/engines/ruby:4.0), where the checked-out workspace is owned by the host runner UID rather than the container user, so git refuses to operate on it. actions/checkout only marks the directory safe under a temporary HOME that does not persist, so rubygems/release-gem's git commands still hit the error. This blocks publishing the libdatadog 35.0.0 gem.

What does this PR do?

Runs the publish job directly on the runner with ruby/setup-ruby instead of inside a container, so git operates as the same user that owns the checkout and no ownership workaround is needed. This mirrors how the other host-based jobs (and publish.yml) already run.

publish.yml is intentionally left untouched.

How to test the change?

Re-run the Build workflow with push enabled on main; the Publish job should get past rubygems/release-gem's git steps and publish the gems. (Note: a successful run is a real release to RubyGems.org.)

Additional Notes:

A follow-up is planned to drop rubygems/release-gem in favor of a minimal configure-rubygems-credentials + vendored sigstore attestation patch + gem push, but this PR is the minimal fix to unblock the release.

AI was used to accelerate implementation; all code was reviewed and understood.

The publish job ran in a container where the checked-out workspace is
owned by the host runner UID rather than the container user, so git
rejected it with "detected dubious ownership" and rubygems/release-gem's
git commands failed. Run the job directly on the runner with
ruby/setup-ruby, like the rest of the host-based jobs, so git operates as
the same user that owns the checkout and no ownership workaround is
needed.
@lloeki lloeki requested review from a team as code owners June 17, 2026 10:13
@lloeki lloeki merged commit 12cd105 into main Jun 17, 2026
54 of 55 checks passed
@lloeki lloeki deleted the lloeki/fix-publish-git-ownership branch June 17, 2026 10:30
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