Skip to main content

Tiny actions/core-style helpers for Python GitHub Actions

Project description

gh-actions-tool-kit

A lightweight, typed, and fully documented Python equivalent of @actions/core for GitHub Actions.


🚀 Quick Start

Installation

pip install gh-actions-tool-kit

Usage

# ================================
# greeting.py
# ================================

from actions_tool_kit import get_input, set_output, notice, group

def main() -> None:
    name = get_input("name", required=True)
    with group("Greeting"):
        message = f"Hello, {name}!"
        notice(message, title="Python Action")
        set_output("greeting", message)

if __name__ == "__main__":
    main()

Example Workflow

name: demo
on: [push]
jobs:
  run:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v4
      - name: Setup Python
        uses: actions/setup-python@v5
        with:
          python-version: "3.11"
      - name: Run Python Action
        env:
          name: <your name>
        run: python greeting.py

🧩 Features

Feature Equivalent in JS @actions/core Status
get_input()
get_boolean_input()
set_output()
export_variable()
add_path()
save_state() / get_state()
set_secret()
append_summary()
notice(), warning(), error()
debug()
group() / start_group() / end_group()

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

gh_actions_tool_kit-0.1.1.tar.gz (10.5 kB view details)

Uploaded Source

Built Distribution

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

gh_actions_tool_kit-0.1.1-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

Details for the file gh_actions_tool_kit-0.1.1.tar.gz.

File metadata

  • Download URL: gh_actions_tool_kit-0.1.1.tar.gz
  • Upload date:
  • Size: 10.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for gh_actions_tool_kit-0.1.1.tar.gz
Algorithm Hash digest
SHA256 19b87a2552deac41c2324d6e7eff348d51e458feace59cfb57817949e3f04ff3
MD5 bdcfd4411b94fb62129dbe47ffa9fbb3
BLAKE2b-256 e7b9154bc0d001686ec48389064ee1e079182eab0ae59ca1284a7f9da0a568ca

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_actions_tool_kit-0.1.1.tar.gz:

Publisher: upload-to-pypi.yml on ab-git-actions/gh-actions-tool-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file gh_actions_tool_kit-0.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_actions_tool_kit-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 8045c88a32a94dad0f4b9f7fb70c9c6554e21517c241b4a9e0b06c5588c67212
MD5 940223b2d9327ae3aace8115d4ddd073
BLAKE2b-256 03a092cc0eb27acca953b71eca720911fb19b638c62bd4f8402dd6eaffed6e86

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_actions_tool_kit-0.1.1-py3-none-any.whl:

Publisher: upload-to-pypi.yml on ab-git-actions/gh-actions-tool-kit

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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