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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5b533acce23fc52824ef38af848e7a46c7e3f1aaa059e6bb9ae9ffc14402e8b3
|
|
| MD5 |
be822b53fba429b8c21e5e21d3d5a898
|
|
| BLAKE2b-256 |
75ae889bfeaf6d898f6d5b14a4440de80580efbfd8b30c59386564d31cdf64f6
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_actions_tool_kit-0.1.0.tar.gz -
Subject digest:
5b533acce23fc52824ef38af848e7a46c7e3f1aaa059e6bb9ae9ffc14402e8b3 - Sigstore transparency entry: 626307638
- Sigstore integration time:
-
Permalink:
ab-git-actions/gh-actions-tool-kit@99f70d52343c5648c2d0258777e0eb65d2779cd1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ab-git-actions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload-to-pypi.yml@99f70d52343c5648c2d0258777e0eb65d2779cd1 -
Trigger Event:
workflow_dispatch
-
Statement type:
File details
Details for the file gh_actions_tool_kit-0.1.0-py3-none-any.whl.
File metadata
- Download URL: gh_actions_tool_kit-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e6f422b224fb1a8286bde88ef7f015636342e762f2c934b66fec38611fc0f5e1
|
|
| MD5 |
c358a0d9953b76226f6c63daa2c5e25b
|
|
| BLAKE2b-256 |
c9c672d364cfe3ed95153052b0a67be522675ed9d1469124c98c323741a56d68
|
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
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
gh_actions_tool_kit-0.1.0-py3-none-any.whl -
Subject digest:
e6f422b224fb1a8286bde88ef7f015636342e762f2c934b66fec38611fc0f5e1 - Sigstore transparency entry: 626307640
- Sigstore integration time:
-
Permalink:
ab-git-actions/gh-actions-tool-kit@99f70d52343c5648c2d0258777e0eb65d2779cd1 -
Branch / Tag:
refs/heads/main - Owner: https://github.com/ab-git-actions
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
upload-to-pypi.yml@99f70d52343c5648c2d0258777e0eb65d2779cd1 -
Trigger Event:
workflow_dispatch
-
Statement type: