Skip to content

Commit 19cfbb6

Browse files
committed
test
1 parent 63190f4 commit 19cfbb6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

.github/workflows/template_build_deploy.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ env:
3030
REGISTRY_PASSWORD: ${{ secrets.DOCKER_PASSWORD != '' && secrets.DOCKER_PASSWORD || secrets.GITHUB_TOKEN }}
3131
REPOSITORY: ${{ vars.DOCKER_REPOSITORY != '' && vars.DOCKER_REPOSITORY || github.repository }}
3232
BOLT_GEM: 1
33-
GEM_PUPPET_LITMUS: ${{ github.event.inputs.puppet_litmus }}
33+
GEM_PUPPET_LITMUS: ${{ inputs.puppet_litmus }}
3434

3535
jobs:
3636
select:
@@ -47,18 +47,18 @@ jobs:
4747
def valid_json?(data)
4848
!!(JSON.parse(data) || true) rescue false
4949
end
50-
event = JSON.parse(File.read(ENV['GITHUB_EVENT_PATH']))
51-
event['inputs'].select! do |key, val|
52-
next if val.nil? || val.empty?
50+
inputs = JSON.parse('${{ toJSON(inputs) }}')
51+
inputs.select! do |key, val|
52+
next if val.nil? || val.to_s.empty?
5353
case key
54-
when "puppet_litmus"
54+
when 'puppet_litmus'
5555
!valid_json?(val) || val.match?(%r{[();]})
5656
end
5757
end
58-
event['inputs'].each do |key, value|
58+
inputs.each do |key, value|
5959
puts "::error title=#{key} invalid::#{value}"
6060
end
61-
exit 1 unless event['inputs'].empty?
61+
exit 1 unless inputs.empty?
6262
6363
- name: Checkout repository
6464
uses: actions/checkout@v4

0 commit comments

Comments
 (0)