goofing around with actions
Some checks failed
Validate on Push / validate (push) Failing after 21s

This commit is contained in:
2023-12-27 14:18:51 +05:30
parent 1b626d6389
commit e3e5906be1
4 changed files with 46 additions and 1 deletions

View File

@@ -0,0 +1,10 @@
#!/usr/bin/env ruby
pattern = /(<!--\s*AUTOGEN:pct\s*-->\n)(.*)(\n<!--\s*END:pct\s*-->)/m
readme_contents = File.read('README.md')
new_pct = ARGV[0]
badge = "![](https://img.shields.io/badge/Progress-#{new_pct}%25-orange)"
new_readme_contents = readme_contents.gsub(pattern, %{\\1#{badge}\\3})
puts new_readme_contents
File.write('README.md', new_readme_contents)