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.0.tar.gz
(271.7 kB
view hashes)
Built Distribution
Close
Hashes for github_custom_actions-1.2.0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 80a2adef1d389ec285f18cc8b3e8b6793403cba48624b06a09537df5eb7e7063 |
|
MD5 | 200cccaa9ecd24b51187a0252c6d6986 |
|
BLAKE2b-256 | a765de98f1791d0b8b4afec8362924fe540fb992a12a128393f5b720528fe451 |
Close
Hashes for github_custom_actions-1.2.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 68d5d94b35df605506928b0e74ee6043da878fb93721007acf47063edadfeb0b |
|
MD5 | 47d16c1dbeb563d3d9f8bdeac25352cc |
|
BLAKE2b-256 | 026423a0730177c2e1809d01e5dbe2e7ef57a2a3adc5232631e68170eddb1a0e |