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_core 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.0.tar.gz (7.7 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.0-py3-none-any.whl (7.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: gh_actions_tool_kit-0.1.0.tar.gz
  • Upload date:
  • Size: 7.7 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.0.tar.gz
Algorithm Hash digest
SHA256 5b533acce23fc52824ef38af848e7a46c7e3f1aaa059e6bb9ae9ffc14402e8b3
MD5 be822b53fba429b8c21e5e21d3d5a898
BLAKE2b-256 75ae889bfeaf6d898f6d5b14a4440de80580efbfd8b30c59386564d31cdf64f6

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_actions_tool_kit-0.1.0.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.0-py3-none-any.whl.

File metadata

File hashes

Hashes for gh_actions_tool_kit-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e6f422b224fb1a8286bde88ef7f015636342e762f2c934b66fec38611fc0f5e1
MD5 c358a0d9953b76226f6c63daa2c5e25b
BLAKE2b-256 c9c672d364cfe3ed95153052b0a67be522675ed9d1469124c98c323741a56d68

See more details on using hashes here.

Provenance

The following attestation bundles were made for gh_actions_tool_kit-0.1.0-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