diff --git a/spcd/__init__.py b/spcd/__init__.py index 3bfe67a..c7622ed 100644 --- a/spcd/__init__.py +++ b/spcd/__init__.py @@ -45,7 +45,11 @@ def clone_project_branch() -> None: def install_actions() -> None: - """Make actions usable in workflows.""" + """Make actions usable in workflows. + + :param path: entry point file + :type path: Path + """ step("Install actions") name = "action.yaml" root = project.root / "act" diff --git a/spcd/act.py b/spcd/act.py index 3f6a003..203528e 100644 --- a/spcd/act.py +++ b/spcd/act.py @@ -1,7 +1,6 @@ """Actions available for workflows.""" import os -from ast import literal_eval from pathlib import Path from rwx import ps @@ -10,26 +9,13 @@ from rwx.log import stream as log from spcd.ci import project, projects from spcd.shell import env -PREFIX = "INPUT_" - def action() -> None: """Display action inputs.""" - for variable, value in parse_inputs().items(): - log.info("%s = %s", variable, value) - - -def parse_inputs() -> dict[str, object]: - """Parse inputs as a dictionary. - - :return: name & value pairs - :rtype: dict[str, object] - """ - d = {} + prefix = "INPUT_" for variable, value in sorted(projects.environment.items()): - if variable.startswith(PREFIX): - d[variable.removeprefix(PREFIX)] = literal_eval(value) - return d + if variable.startswith(prefix): + log.info("%s = %s", variable, value) def synchronize(source: str | None = None, target: str | None = None) -> None: