File tree Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Expand file tree Collapse file tree 1 file changed +7
-7
lines changed Original file line number Diff line number Diff line change 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
3535jobs :
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
You can’t perform that action at this time.
0 commit comments