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
class MyInputs(ActionInputs):
my_input: str
"""My input description"""
my_path: Path
"""My path description"""
class MyAction(ActionBase):
def __init__(self):
super().__init__(inputs=MyInputs())
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.1.0.tar.gz
(268.4 kB
view hashes)
Built Distribution
Close
Hashes for github_custom_actions-1.1.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2220313eecbcc53b521786fd039b24530283fc0d1c1b988a6a1c31a4bc973173 |
|
MD5 | c200132c0bdab38f9b91f870961e243b |
|
BLAKE2b-256 | d5dca1258682aa68a1764a1a57cf41b38d78f921fef4e16cd1370f39bb9cc83c |
Close
Hashes for github_custom_actions-1.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c57426abfcde61dd56fc577bfa32fc9e339ba40860a88b0c45300089a7eb9ad9 |
|
MD5 | f62058e570f86f943569350cac90d21c |
|
BLAKE2b-256 | 73b5e227f044d1efe85d60415820e16d3add047411888e7608560f1951633f5f |