Skip to content

Commit

Permalink
Merge pull request #888 from StatensPensjonskasse/support-arbitrary-i…
Browse files Browse the repository at this point in the history
…nputs-to-reusable-workflow-files

Support arbitrary inputs to reusable workflow files
  • Loading branch information
bastelfreak committed Apr 24, 2024
2 parents 3e46f99 + f6e8bc4 commit d18fde4
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
12 changes: 11 additions & 1 deletion moduleroot/.github/workflows/ci.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,11 @@ jobs:
uses: voxpupuli/gha-puppet/.github/workflows/beaker.yml@v2
with:
pidfile_workaround: '<%= @configs['pidfile_workaround'] %>'
<%- if @configs['with'] -%>
<%- @configs['with'].each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
<%- end -%>
<%- if @configs['unit_runs_on'] -%>
unit_runs_on: '<%= @configs['unit_runs_on'] %>'
<%- end -%>
Expand All @@ -37,9 +42,14 @@ jobs:
<%- end -%>
<%- else -%>
uses: voxpupuli/gha-puppet/.github/workflows/basic.yml@v2
<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? || @configs.key?('unit_runs_on') -%>
<%- if @configs.key?('rubocop') || !@configs['additional_packages'].empty? || @configs.key?('unit_runs_on') || @configs.key?('with') -%>
with:
<%- end -%>
<%- if @configs['with'] -%>
<%- @configs['with'].each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
<%- end -%>
<%- end -%>
<%- unless @configs['additional_packages'].empty? -%>
additional_packages: '<%= @configs['additional_packages'] %>'
Expand Down
5 changes: 5 additions & 0 deletions moduleroot/.github/workflows/release.yml.erb
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ jobs:
name: Release
uses: voxpupuli/gha-puppet/.github/workflows/release.yml@v2
with:
<%- if @configs['with'] -%>
<%- @configs['with'].each do |k,v| -%>
<%= k %>: <%= v %>
<%- end -%>
<%- end -%>
allowed_owner: '<%= @configs[:namespace] %>'
secrets:
# Configure secrets here:
Expand Down

0 comments on commit d18fde4

Please sign in to comment.