Skip to content

Commit 2c51e06

Browse files
feat(ci): add PuppetCore gem source support to module_ci workflow
- Add ruby_version input parameter with default of '2.7' - Add puppetcore_api_type input parameter with default of 'forge-key' - Configure environment variables for Puppet Core authentication - Update ruby-version in workflow to use the input parameter - Add documentation on requirements for enabling PuppetCore Signed-off-by: Gavin Didrichsen <[email protected]>
1 parent cb81a0b commit 2c51e06

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

.github/workflows/module_ci.yml

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,23 @@ on:
1919
required: false
2020
default: false
2121
type: "boolean"
22+
ruby_version:
23+
description: "Ruby version to use"
24+
required: false
25+
default: '2.7'
26+
type: "string"
27+
puppetcore_api_type:
28+
description: "The type of API to use for Puppet Core."
29+
required: false
30+
default: 'forge-key'
31+
type: "string"
2232

33+
# ENABLE PUPPETCORE. The calling workflow must:
34+
# - Set a valid PUPPET_FORGE_TOKEN secret on its repository.
35+
# - Set ruby_version >= 3.1 to override this workflow's default 2.7; otherwise bundle install will fail.
36+
env:
37+
PUPPET_FORGE_TOKEN: ${{ secrets.PUPPET_FORGE_TOKEN }}
38+
BUNDLE_RUBYGEMS___PUPPETCORE__PUPPET__COM: "${{ inputs.puppetcore_api_type }}:${{ secrets.PUPPET_FORGE_TOKEN }}"
2339

2440
jobs:
2541
setup_matrix:
@@ -41,7 +57,7 @@ jobs:
4157
- name: "Setup ruby"
4258
uses: "ruby/setup-ruby@v1"
4359
with:
44-
ruby-version: "2.7"
60+
ruby-version: ${{ inputs.ruby_version }}
4561
bundler-cache: true
4662

4763
- name: "Bundle environment"

0 commit comments

Comments
 (0)