Python package for creating custom GitHub Actions.
Project description
github-custom-actions
Python package for creating custom GitHub Actions.
Example of usage
from github_custom_actions import ActionBase, ActionInputs, ActionOutputs
class MyInputs(ActionInputs):
my_input: str
"""My input description"""
my_path: Path
"""My path description"""
class MyOutputs(ActionOutputs):
runner_os: str
"""Runner OS description"""
class MyAction(ActionBase):
def __init__(self):
super().__init__(inputs=MyInputs(), outputs=MyOutputs())
if self.inputs.my_path is None:
raise ValueError("my_path is required")
def main(self):
self.inputs.my_path.mkdir(exist_ok=True)
self.outputs.runner_os = self.vars.runner_os
self.summary.text += (
self.render(
"### {{ inputs.my_input }}.\n"
"Have a nice day!"
)
)
if __name__ == "__main__":
MyAction().run()
Documentation
Developers
Do not forget to run . ./activate.sh
.
Scripts
Install invoke preferably with pipx:
pipx install invoke
For a list of available scripts run:
invoke --list
For more information about a script run:
invoke <script> --help
Coverage report
Created with cookiecutter using template
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
github_custom_actions-1.2.1.tar.gz
(271.8 kB
view hashes)
Built Distribution
Close
Hashes for github_custom_actions-1.2.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b6a01a882ec6d959727543a82c9cf67c087bd3b4a21986e151a38f95726443ac |
|
MD5 | bb797d454a38da0486cccd6ef7340bfb |
|
BLAKE2b-256 | 100da07ee7dae838abea33473e8cb0fc32e3cddc7602bf712c97a17f00417769 |
Close
Hashes for github_custom_actions-1.2.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7aff41a7c69b4fc2594c9aec905fc0c9d25c699e7f6c3c4e109fc6166f3d144e |
|
MD5 | a931de52972f802fea84c7dd9cb34634 |
|
BLAKE2b-256 | 3f78700395db330f10a0706f6fb9458363eaf079916aec140a6c39489eb2a694 |