From 4ff385cf441a7623c1936b1fe9295ce1273b6c08 Mon Sep 17 00:00:00 2001 From: Josh Cooper Date: Tue, 15 Jul 2025 16:07:07 -0700 Subject: [PATCH] Install released gems This makes it possible to install puppet and facter from the rubygesm-puppetcore server, while still using rubygems.org for everything else. The setup-ruby action with bundler-cache: true will perform a bundle install, so we need to make the credentials available to the action. This also adds a step to list installed gems to verify the expected gems are installed. --- .../unit_tests_with_released_puppet_gem.yaml | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/.github/workflows/unit_tests_with_released_puppet_gem.yaml b/.github/workflows/unit_tests_with_released_puppet_gem.yaml index 89689be..b3356e0 100644 --- a/.github/workflows/unit_tests_with_released_puppet_gem.yaml +++ b/.github/workflows/unit_tests_with_released_puppet_gem.yaml @@ -1,7 +1,11 @@ --- name: Unit Tests with released Puppet gem -on: workflow_call +on: + workflow_call: + secrets: + PUPPET_FORGE_TOKEN_PUBLIC: + required: true jobs: unit_tests_with_released_puppet_gem: @@ -25,7 +29,7 @@ jobs: runs-on: ${{ matrix.os }} env: - PUPPET_GEM_VERSION: ~> ${{ matrix.puppet_version }}.0 + PUPPET_GEM_VERSION: "source:https://rubygems-puppetcore.puppet.com#~> ${{ matrix.puppet_version }}.0" steps: - name: Checkout current PR code uses: actions/checkout@v4 @@ -35,6 +39,11 @@ jobs: with: ruby-version: ${{ matrix.ruby }} bundler-cache: true + env: + BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ secrets.PUPPET_FORGE_TOKEN_PUBLIC }} + + - name: List gems + run: cat Gemfile.lock - name: Run unit tests run: bundle exec rake parallel_spec