1212<%- @configs['main_branches'].each do |main_branch| -%>
1313 - <%= main_branch %>
1414<%- end -%>
15+ <%- if @configs['acceptance_tests'] && Dir[File.join(@metadata[:workdir], 'spec', 'acceptance', '**', '*_spec.rb')].any? -%>
16+ workflow_dispatch:
17+ inputs:
18+ beaker_staging_url:
19+ description: |-
20+ URL to a staging Server to test unreleased packages.
21+ We will append the version to the Server and assume all packages are in the same directory.
22+ Only supported for AIO packages.
23+ required: false
24+ type: string
25+ default: 'https://artifacts.voxpupuli.org/openvox-agent'
26+ beaker_collection:
27+ description: |-
28+ When set to staging, we will download the packages from staging_url.
29+ Otherwise we will use the official repos. Supported values: puppet7, puppet8, openvox7, openvox8, staging.
30+ When unset, we will generate a list of supported collections based on metadata.json.
31+ required: false
32+ type: string
33+ beaker_staging_version:
34+ description: |-
35+ The package version we want to test.
36+ Only used for beaker_collection = staging
37+ required: false
38+ type: string
39+ <%- end -%>
1540
1641concurrency:
1742 group: ${{ github.ref_name }}
@@ -25,11 +50,17 @@ jobs:
2550 name: Puppet
2651<%- if @configs['acceptance_tests'] && Dir[File.join(@metadata[:workdir], 'spec', 'acceptance', '**', '*_spec.rb')].any? -%>
2752 uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v4
53+ with:
54+ beaker_staging_url: ${{ inputs.beaker_staging_url }}
55+ beaker_collection: ${{ inputs.beaker_collection }}
56+ beaker_staging_version: ${{ inputs.beaker_staging_version }}
2857<%- else -%>
2958 uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v4
30- <%- end -%>
3159<%- if @configs['with'] -%>
3260 with:
61+ <%- end -%>
62+ <%- end -%>
63+ <%- if @configs['with'] -%>
3364<%- @configs['with'].each do |k,v| -%>
3465<%- if v.is_a?(String) -%>
3566 <%= k %> : '<%= v %> '
0 commit comments