From 44423ef2ee46ae8cf964fbf0acdf6d8f25fc451f Mon Sep 17 00:00:00 2001 From: Marc Beninca Date: Tue, 15 Oct 2024 21:49:29 +0200 Subject: [PATCH] act/vpy --- spcd/__init__.py | 27 ++++++++++++++++----------- spcd/actions/synchronize/action.yaml | 8 -------- 2 files changed, 16 insertions(+), 19 deletions(-) delete mode 100644 spcd/actions/synchronize/action.yaml diff --git a/spcd/__init__.py b/spcd/__init__.py index ad58e1d..eccad81 100644 --- a/spcd/__init__.py +++ b/spcd/__init__.py @@ -52,17 +52,22 @@ def install_actions(path: Path) -> None: """ step("Install actions") name = "action.yaml" - source = path.parent / "actions" - target = project.root / "act" - for action in [ - "synchronize", - ]: - log.info(action) - r = source / action / name - w = target / action - fs.make_directory(w) - w = w / name - fs.write(w, fs.read_file_text(r)) + root = project.root / "act" + vpy = Path(env.SPCD_PYTHON_VENV_BINARIES) / "python" + action = "synchronize" + log.info(action) + directory = root / action + fs.make_directory(directory) + fs.write(directory / name, f"""\ +inputs: + source: + default: out + required: false +runs: + using: composite + steps: + - run: "{vpy}" -m spcd synchronize +""") def install_commands(path: Path) -> None: diff --git a/spcd/actions/synchronize/action.yaml b/spcd/actions/synchronize/action.yaml deleted file mode 100644 index 46526be..0000000 --- a/spcd/actions/synchronize/action.yaml +++ /dev/null @@ -1,8 +0,0 @@ -inputs: - source: - default: out - required: false -runs: - using: composite - steps: - - run: python3 -m "spcd" "synchronize"