Skip to main content

Create GitHub Actions using Python

Project description

PyAction - Create GitHub Actions Using Python! :sparkles: download ratedownload rate

marketplace version python versions testing status

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

- name: Using the python action
  uses: you/your-python-action@v2
  with:
      name: Jane
      age: 20
from pyaction import PyAction


workflow = PyAction()

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

# $ pyaction run
# [
#    {
#       "var": "phrase",
#       "value": "Hello Jane. You are 20!",
#       "type": "<class 'str'>",
#       "usage": "${{ steps.STEP_ID.outputs.phrase }}"
#    }
# ]

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.

Installation

Run the following command in a fresh CLI tab.

pip install -U "pyaction[cli]"

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

pyaction --version

The pyaction release is made to be super light which will make your workflow run very fast. The pyaction[cli] that you install on your local machine has some additional packages for local development.

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. :sparkles:

License

PyAction is licensed under the MIT License terms.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyaction-0.8.5.tar.gz (18.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pyaction-0.8.5-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

Details for the file pyaction-0.8.5.tar.gz.

File metadata

  • Download URL: pyaction-0.8.5.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyaction-0.8.5.tar.gz
Algorithm Hash digest
SHA256 b6009a79ec4b73a390456eec47699b40960b15b8d6ef60afad8f89e9b7f8ce27
MD5 9b201038dc581d5303d010f098d3cf03
BLAKE2b-256 235d5022674fec7f737e949ff60e9c07269bbb4d91c4e46711beffbdecb6b7c4

See more details on using hashes here.

File details

Details for the file pyaction-0.8.5-py3-none-any.whl.

File metadata

  • Download URL: pyaction-0.8.5-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.10.2 {"installer":{"name":"uv","version":"0.10.2","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for pyaction-0.8.5-py3-none-any.whl
Algorithm Hash digest
SHA256 d121a59fc03ca8b3203b3a231e97ba151bb4fa3868eb476885355fc9ae65f148
MD5 5017f7016d363f44f7ffafb356fdde31
BLAKE2b-256 1ef8e98e0af09f9ba87f222f9aabb065692b733352f50ab09e907621b5931226

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page