Files
jekyll-build-pages/bin/render_action_metadata
T
2021-12-14 11:27:51 -05:00

20 lines
427 B
Ruby
Executable File

#! /usr/bin/env ruby
# Internal: Generate an action.yml metadata file using the inputs
#
# pages_action_url - Docker image URL to be used as the base action image.
require 'erb'
require 'securerandom'
nonce = SecureRandom.hex
pages_action_url = ARGV[0]
action_erb_path = File.dirname(__FILE__) + '/../action.yml.erb'
result = File.open(action_erb_path, 'r') do |file|
ERB.new(file.read).result(binding)
end
puts result