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.4.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.4-py3-none-any.whl (16.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: pyaction-0.8.4.tar.gz
  • Upload date:
  • Size: 18.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for pyaction-0.8.4.tar.gz
Algorithm Hash digest
SHA256 a1a31f94d8e2a5ea026efaaf740d457ba2afdace72a7d61ad70942bbce47a622
MD5 2ea6cba58115f6a66fd0d1f79e372b2d
BLAKE2b-256 618941cc5b53f4dd1fb20f9cac136d81a8d34a574c4bd36693a64c9c55462c32

See more details on using hashes here.

File details

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

File metadata

  • Download URL: pyaction-0.8.4-py3-none-any.whl
  • Upload date:
  • Size: 16.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.5.7

File hashes

Hashes for pyaction-0.8.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d1d4c7752f2e6c2439f0f87ad4ea470bd49dc62386d508b54b248ecf2b42cfe4
MD5 32857f6b65424f20d3d861f04dfa7311
BLAKE2b-256 26a6461aadfee03ca247bad7689515671edddd857034c0260d9a93589c7ea26d

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