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.1.tar.gz
(268.4 kB
view hashes)
Built Distribution
Close
Hashes for github_custom_actions-1.1.1.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce2b6f357486a5252f08770d760687576c0252d0bb4ea71b2a3b750804a51eab |
|
MD5 | 5eaf5d0fa415b9b269e5c4a2a964667b |
|
BLAKE2b-256 | ffceb567e827a0ede893a3385fa7d1463271afd75c7b018e72b66031e4f95f26 |
Close
Hashes for github_custom_actions-1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a39126d6066b1ba8fec9f8981cf1b281102c3ff783cf91c90225a5b6fd63d320 |
|
MD5 | 35206497dcfd6594ea911e3b44fb4aee |
|
BLAKE2b-256 | e861525990ae9a7ae350849013c890d85e3e6df6f8ca40c000f67d85892483c0 |