Skip to content

lnxpy/pyaction

Repository files navigation

PyAction Version) Python Versions codecov Package Testing Docs CI

PyAction helps you to develop GitHub Actions using Python. It's delivered as an installable package with the ability to test the action locally before any deployment.

from pyaction import PyAction


workflow = PyAction.workflow()


@workflow.action()
def greetings_action(name: str, age: int) -> None:
    workflow.write(
        {
            "phrase": f"Hello {name}. You are {age}!"
        }
    )

Check out the official docs for more detailed information. There is also a Quickstart demo tutorial that walks you through a simple hello-world action.

Requirements

  • Python >= 3.8
  • pip

Installation

Run the following command in a fresh CLI tab.

pip install -U pyaction

To make sure the installation process was successful, run the following command.

pyaction --version

Usage

It's recommended to initialize a template, then going along the development process. Thus, run the init command.

pyaction init

Answer the prompts and your template will be generated. Check out the docs for the further steps.

Contribution

All your contributions and assistance are welcome. For more information about how you can contribute to the project, please follow the instructions here. ✨

License

PyAction is licensed under the MIT License terms.