Skip to content

Commit

Permalink
Add kpops empty action
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKora committed Dec 1, 2023
1 parent fe32ff1 commit 89ee139
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 21 deletions.
1 change: 1 addition & 0 deletions actions/kpops-runner/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
# [KPOps runner](https://github.com/bakdata/kpops/tree/main/actions/kpops-runner)
43 changes: 22 additions & 21 deletions generate-doc.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,27 +56,28 @@ def run():
# checking if it is a subidr
if not os.path.isfile(action_subdir_path):
action_file = os.path.join(action_subdir_path, "action.y*")

# create docu in tmp dir
tmp_docu_output_dir = os.path.join(
tmp_action, action_name)
if not os.path.exists(tmp_docu_output_dir):
os.makedirs(tmp_docu_output_dir)

tmp_docu_output_action = os.path.join(
tmp_action, action_name, "Variables.md")

with open(tmp_docu_output_action, 'w') as file:
l1 = f"# Refenrences {action_name} composite action\n"
l2 = "## Inputs\n"
l3 = "## Outputs\n"
file.writelines([l1, l2, l3])
os.system(
f"auto-doc -f {action_file} --colMaxWidth 10000 --colMaxWords 2000 -o {tmp_docu_output_action}")

output_file_action = f"docs/references/actions/{action_name}/Variables.md"
changes.append({"existing": output_file_action,
"tmp_output": tmp_docu_output_action})
# exclude action directory without an action.yaml file
if os.path.exists(action_file):
# create docu in tmp dir
tmp_docu_output_dir = os.path.join(
tmp_action, action_name)
if not os.path.exists(tmp_docu_output_dir):
os.makedirs(tmp_docu_output_dir)

tmp_docu_output_action = os.path.join(
tmp_action, action_name, "Variables.md")

with open(tmp_docu_output_action, 'w') as file:
l1 = f"# Refenrences {action_name} composite action\n"
l2 = "## Inputs\n"
l3 = "## Outputs\n"
file.writelines([l1, l2, l3])
os.system(
f"auto-doc -f {action_file} --colMaxWidth 10000 --colMaxWords 2000 -o {tmp_docu_output_action}")

output_file_action = f"docs/references/actions/{action_name}/Variables.md"
changes.append({"existing": output_file_action,
"tmp_output": tmp_docu_output_action})

# go through workflows
tmp_workflow = "tmps/workflows"
Expand Down

0 comments on commit 89ee139

Please sign in to comment.