graph height fixed, local yearly data caching added

This commit is contained in:
pseusys
2023-02-28 00:28:51 +01:00
parent 9b17f20ed2
commit e563addad9
5 changed files with 48 additions and 10 deletions

View File

@@ -106,7 +106,7 @@ class GitHubManager:
return False
@staticmethod
def set_github_output(stats: str):
def set_github_output(stats: str) -> bool:
"""
Outputs readme data as current action output instead of committing it.
@@ -114,13 +114,15 @@ class GitHubManager:
"""
DBM.i("Setting README contents as action output...")
if "GITHUB_OUTPUT" not in environ.keys():
raise Exception("Not in GitHub environment ('GITHUB_OUTPUT' not defined)!")
DBM.p("Not in GitHub environment, not setting action output!")
return False
prefix = "README stats current output:"
eol = "".join(choice(ascii_letters) for _ in range(10))
FM.write_file(environ["GITHUB_OUTPUT"], f"README_CONTENT<<{eol}\n{prefix}\n\n{stats}\n{eol}\n", append=True)
DBM.g("Action output set!")
return True
@staticmethod
def update_chart(chart_path: str) -> str: