Skip to content

Commit 4ff385c

Browse files
committed
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.
1 parent 9e835fd commit 4ff385c

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

.github/workflows/unit_tests_with_released_puppet_gem.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,11 @@
11
---
22
name: Unit Tests with released Puppet gem
33

4-
on: workflow_call
4+
on:
5+
workflow_call:
6+
secrets:
7+
PUPPET_FORGE_TOKEN_PUBLIC:
8+
required: true
59

610
jobs:
711
unit_tests_with_released_puppet_gem:
@@ -25,7 +29,7 @@ jobs:
2529

2630
runs-on: ${{ matrix.os }}
2731
env:
28-
PUPPET_GEM_VERSION: ~> ${{ matrix.puppet_version }}.0
32+
PUPPET_GEM_VERSION: "source:https://rubygems-puppetcore.puppet.com#~> ${{ matrix.puppet_version }}.0"
2933
steps:
3034
- name: Checkout current PR code
3135
uses: actions/checkout@v4
@@ -35,6 +39,11 @@ jobs:
3539
with:
3640
ruby-version: ${{ matrix.ruby }}
3741
bundler-cache: true
42+
env:
43+
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: forge-key:${{ secrets.PUPPET_FORGE_TOKEN_PUBLIC }}
44+
45+
- name: List gems
46+
run: cat Gemfile.lock
3847

3948
- name: Run unit tests
4049
run: bundle exec rake parallel_spec

0 commit comments

Comments
 (0)