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.2.tar.gz
(271.9 kB
view hashes)
Built Distribution
Close
Hashes for github_custom_actions-1.2.2.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8a95736d268363b2a90126134bfa9f6f03dc738317eb0b62e3b9991602cea90a |
|
MD5 | beedfd3a7f39a7b3d5804dca6efd5e4f |
|
BLAKE2b-256 | e9acd503fcd1980c3d19b046a87b9b8c8e8c46e52e550027c0c2d99e88bad399 |
Close
Hashes for github_custom_actions-1.2.2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8e94f26b513c4d99d2582db5f5453784a8dbda282ef3ccef4ab98739df65b980 |
|
MD5 | b2c81c19deb000966fa8de5dc33d4aba |
|
BLAKE2b-256 | 6d4ed99238a1d3a5fdb2cf75cb35586398406762f8119b30155877f7b496707d |