Skip to content

Commit e88b20f

Browse files
authored
Merge pull request #183 from puppetlabs/add-ruby-version-param
(CAT-2724) Add ruby_version input to acceptance and mend reusable workflows
2 parents 1d317b6 + 9c0af81 commit e88b20f

2 files changed

Lines changed: 14 additions & 4 deletions

File tree

‎.github/workflows/mend_ruby.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ on:
1414
product_name:
1515
default: 'content-and-tooling'
1616
type: string
17+
ruby_version:
18+
description: "Ruby version to use"
19+
required: false
20+
default: '3.1'
21+
type: "string"
1722

1823
env:
1924
MEND_API_KEY: ${{ secrets.MEND_API_KEY != '' && secrets.MEND_API_KEY || inputs.api_key }}
@@ -46,9 +51,9 @@ jobs:
4651

4752
- name: "setup ruby"
4853
if: success()
49-
uses: "ruby/setup-ruby@v1"
54+
uses: "ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f" # v1.310.0
5055
with:
51-
ruby-version: 3.1
56+
ruby-version: ${{ inputs.ruby_version }}
5257

5358
- name: "bundle lock"
5459
if: success()

‎.github/workflows/module_acceptance.yml‎

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@ on:
2626
description: "Disable and stop apparmor"
2727
default: false
2828
type: boolean
29+
ruby_version:
30+
description: "Ruby version to use"
31+
required: false
32+
default: '3.1'
33+
type: "string"
2934

3035

3136
permissions:
@@ -72,7 +77,7 @@ jobs:
7277
- name: "Setup ruby"
7378
uses: "ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f" # v1.310.0
7479
with:
75-
ruby-version: "3.1"
80+
ruby-version: ${{ inputs.ruby_version }}
7681
bundler-cache: true
7782

7883
- name: "Bundle environment"
@@ -184,7 +189,7 @@ jobs:
184189
- name: "Setup ruby"
185190
uses: "ruby/setup-ruby@afeafc3d1ab54a631816aba4c914a0081c12ff2f" # v1.310.0
186191
with:
187-
ruby-version: "3.1"
192+
ruby-version: ${{ inputs.ruby_version }}
188193
bundler-cache: true
189194

190195
- name: "Bundle environment"

0 commit comments

Comments
 (0)