From 30a2a1db73299b149917b77df18bfd436f501c06 Mon Sep 17 00:00:00 2001 From: Loic Nageleisen Date: Wed, 17 Jun 2026 11:26:49 +0200 Subject: [PATCH] Run publish job on the host instead of in a container 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. --- .github/workflows/build.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 77d6705..3bc9e1d 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -300,8 +300,6 @@ jobs: if: inputs.push && github.ref == 'refs/heads/main' needs: [validate-linux, validate-macos] runs-on: ubuntu-24.04 - container: - image: ghcr.io/datadog/images-rb/engines/ruby:4.0 environment: rubygems.org concurrency: publish permissions: @@ -310,6 +308,11 @@ jobs: - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 with: persist-credentials: false + - name: Set up Ruby + uses: ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f # 1.310.0 + with: + ruby-version: "4.0" + bundler-cache: true - run: bundle install - name: Download pre-built gems into pkg/ uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1