# Github Actions Utils
---
<a href="https://github.com/heitorpolidoro/github_actions_utils" >
<img src="https://pngimg.com/uploads/github/github_PNG15.png" alt="GitHub" style="height:100px;">
</a>
[![Create Pull Request](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/create.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/create.yml)
[![Code Quality](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/ci_cd.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/ci_cd.yml)
[![Release](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/release.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/release.yml)
[![Upload Python Package](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/python-publish.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/python-publish.yml)
![GitHub last commit](https://img.shields.io/github/last-commit/heitorpolidoro/github_actions_utils)
[![Latest](https://img.shields.io/github/release/heitorpolidoro/github_actions_utils.svg?label=latest)](https://github.com/heitorpolidoro/github_actions_utils/releases/latest)
![GitHub Release Date](https://img.shields.io/github/release-date/heitorpolidoro/github_actions_utils)
![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/heitorpolidoro/github_actions_utils/latest)
<!--
![GitHub top language](https://img.shields.io/github/languages/top/heitorpolidoro/github_actions_utils)
![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/w/heitorpolidoro/github_actions_utils)
-->
<!--
![GitHub Repo stars](https://img.shields.io/github/stars/heitorpolidoro/github_actions_utils)
![GitHub watchers](https://img.shields.io/github/watchers/heitorpolidoro/github_actions_utils)
-->
![GitHub issues](https://img.shields.io/github/issues/heitorpolidoro/github_actions_utils)
![GitHub pull requests](https://img.shields.io/github/issues-pr/heitorpolidoro/github_actions_utils)
![GitHub Discussions](https://img.shields.io/github/discussions/heitorpolidoro/github_actions_utils)
<!--
![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/heitorpolidoro/github_actions_utils)
![GitHub repo file count (file extension)](https://img.shields.io/github/directory-file-count/heitorpolidoro/github_actions_utils/github_actions_utils)
![GitHub contributors](https://img.shields.io/github/contributors-anon/heitorpolidoro/github_actions_utils)
-->
<!--
![GitHub all releases](https://img.shields.io/github/downloads/heitorpolidoro/github_actions_utils/total)
-->
<!--
---
<a href="https://pypi.org/project/github-actions-utils/" >
<img src="https://pypi.org/static/images/logo-large.9f732b5f.svg" alt="PyPi" style="height:100px;">
</a>
![PyPI - Status](https://img.shields.io/pypi/status/github_actions_utils)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/github_actions_utils)
![PyPI - Version](https://img.shields.io/pypi/v/github_actions_utils)
-->
<!-- # TODO pip cache
![PyPI - Downloads](https://img.shields.io/pypi/dm/github_actions_utils)
-->
---
<a href="https://sonarcloud.io/project/overview?id=heitorpolidoro_github_actions_utils" >
<img src="https://community.finos.org/img/vendors/sonarcloud-logo.png" alt="Sonarcloud" style="height:100px;">
</a>
[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=coverage)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=bugs)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)
<a href="https://coveralls.io/github/heitorpolidoro/github_actions_utils">
<img src="https://camo.githubusercontent.com/e66287f3f07172ea5536b34b3c4d02b03dee5901aecd641bb15b95549dfdd147/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6173736574732e636f766572616c6c732e696f2f636f766572616c6c735f6c6f676f747970652d30312e706e67" alt="Sonarcloud" style="height:100px">
</a>
[![Coverage Status](https://coveralls.io/repos/github/heitorpolidoro/github_actions_utils/badge.svg?branch=master)](https://coveralls.io/github/heitorpolidoro/github_actions_utils?branch=master)
![GitHub](https://img.shields.io/github/license/heitorpolidoro/github_actions_utils)
### Log Utils
#### github group decorator
```python
from github_actions_utils.log_utils import github_group
@github_group("foo")
def foo():
code
```
Will produce in github action log
```log
▸ foo
```
You can use the function parameters as input like:
```python
@github_group("Running $cmd")
def run(cmd):
code
```
When your code calls the `run` function will print user the value from `cmd` parameter:
```python
run("nice command")
```
```log
▸ Running nice command
```
Even if the value is an object and you want a value from the object attribute:
```python
@github_group("Hello $(person.name)")
def hello(person):
code
```
```python
p = Person(name="Heitor")
hello(p)
```
```log
▸ Hello Heitor
```
Raw data
{
"_id": null,
"home_page": "",
"name": "github-actions-utils",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.10",
"maintainer_email": "",
"keywords": "github,actions,utils",
"author": "Heitor Luis Polidoro",
"author_email": "",
"download_url": "https://files.pythonhosted.org/packages/de/f6/31dbdd2f6542c6dabd0eac33d2d29e3cd693a681dba1597aa8372f9abd81/github_actions_utils-0.6.0.tar.gz",
"platform": null,
"description": "# Github Actions Utils\n\n---\n<a href=\"https://github.com/heitorpolidoro/github_actions_utils\" >\n <img src=\"https://pngimg.com/uploads/github/github_PNG15.png\" alt=\"GitHub\" style=\"height:100px;\">\n</a>\n\n[![Create Pull Request](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/create.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/create.yml)\n[![Code Quality](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/ci_cd.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/ci_cd.yml)\n[![Release](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/release.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/release.yml)\n[![Upload Python Package](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/python-publish.yml/badge.svg)](https://github.com/heitorpolidoro/github_actions_utils/actions/workflows/python-publish.yml)\n\n![GitHub last commit](https://img.shields.io/github/last-commit/heitorpolidoro/github_actions_utils)\n[![Latest](https://img.shields.io/github/release/heitorpolidoro/github_actions_utils.svg?label=latest)](https://github.com/heitorpolidoro/github_actions_utils/releases/latest)\n![GitHub Release Date](https://img.shields.io/github/release-date/heitorpolidoro/github_actions_utils)\n![GitHub commits since latest release (by SemVer including pre-releases)](https://img.shields.io/github/commits-since/heitorpolidoro/github_actions_utils/latest)\n\n<!--\n![GitHub top language](https://img.shields.io/github/languages/top/heitorpolidoro/github_actions_utils)\n![GitHub commit activity (branch)](https://img.shields.io/github/commit-activity/w/heitorpolidoro/github_actions_utils)\n-->\n\n<!--\n![GitHub Repo stars](https://img.shields.io/github/stars/heitorpolidoro/github_actions_utils)\n![GitHub watchers](https://img.shields.io/github/watchers/heitorpolidoro/github_actions_utils)\n-->\n![GitHub issues](https://img.shields.io/github/issues/heitorpolidoro/github_actions_utils)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/heitorpolidoro/github_actions_utils)\n![GitHub Discussions](https://img.shields.io/github/discussions/heitorpolidoro/github_actions_utils)\n\n<!--\n![GitHub code size in bytes](https://img.shields.io/github/languages/code-size/heitorpolidoro/github_actions_utils)\n![GitHub repo file count (file extension)](https://img.shields.io/github/directory-file-count/heitorpolidoro/github_actions_utils/github_actions_utils)\n![GitHub contributors](https://img.shields.io/github/contributors-anon/heitorpolidoro/github_actions_utils)\n-->\n\n<!--\n![GitHub all releases](https://img.shields.io/github/downloads/heitorpolidoro/github_actions_utils/total)\n-->\n<!--\n\n---\n\n<a href=\"https://pypi.org/project/github-actions-utils/\" >\n <img src=\"https://pypi.org/static/images/logo-large.9f732b5f.svg\" alt=\"PyPi\" style=\"height:100px;\">\n</a>\n\n![PyPI - Status](https://img.shields.io/pypi/status/github_actions_utils)\n![PyPI - Python Version](https://img.shields.io/pypi/pyversions/github_actions_utils)\n![PyPI - Version](https://img.shields.io/pypi/v/github_actions_utils)\n-->\n<!-- # TODO pip cache\n![PyPI - Downloads](https://img.shields.io/pypi/dm/github_actions_utils)\n-->\n\n---\n<a href=\"https://sonarcloud.io/project/overview?id=heitorpolidoro_github_actions_utils\" >\n <img src=\"https://community.finos.org/img/vendors/sonarcloud-logo.png\" alt=\"Sonarcloud\" style=\"height:100px;\">\n</a>\n\n[![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=alert_status)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n\n[![Vulnerabilities](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=vulnerabilities)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Duplicated Lines (%)](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=duplicated_lines_density)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=reliability_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Technical Debt](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=sqale_index)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=coverage)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=ncloc)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Code Smells](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=code_smells)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Maintainability Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=sqale_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=security_rating)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n[![Bugs](https://sonarcloud.io/api/project_badges/measure?project=heitorpolidoro_github_actions_utils&metric=bugs)](https://sonarcloud.io/summary/new_code?id=heitorpolidoro_github_actions_utils)\n\n\n<a href=\"https://coveralls.io/github/heitorpolidoro/github_actions_utils\">\n <img src=\"https://camo.githubusercontent.com/e66287f3f07172ea5536b34b3c4d02b03dee5901aecd641bb15b95549dfdd147/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6173736574732e636f766572616c6c732e696f2f636f766572616c6c735f6c6f676f747970652d30312e706e67\" alt=\"Sonarcloud\" style=\"height:100px\">\n</a>\n\n[![Coverage Status](https://coveralls.io/repos/github/heitorpolidoro/github_actions_utils/badge.svg?branch=master)](https://coveralls.io/github/heitorpolidoro/github_actions_utils?branch=master)\n\n![GitHub](https://img.shields.io/github/license/heitorpolidoro/github_actions_utils)\n\n### Log Utils\n#### github group decorator\n```python\nfrom github_actions_utils.log_utils import github_group\n\n@github_group(\"foo\")\ndef foo():\n code\n```\nWill produce in github action log\n```log\n\u25b8 foo\n```\nYou can use the function parameters as input like:\n```python\n@github_group(\"Running $cmd\")\ndef run(cmd):\n code\n```\nWhen your code calls the `run` function will print user the value from `cmd` parameter:\n```python\nrun(\"nice command\")\n```\n```log\n\u25b8 Running nice command\n```\nEven if the value is an object and you want a value from the object attribute:\n```python\n@github_group(\"Hello $(person.name)\")\ndef hello(person):\n code\n```\n```python\np = Person(name=\"Heitor\")\nhello(p)\n```\n```log\n\u25b8 Hello Heitor\n```\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Package of useful functions for GitHub Actions.",
"version": "0.6.0",
"project_urls": {
"Homepage": "https://github.com/heitorpolidoro/github_actions_utils"
},
"split_keywords": [
"github",
"actions",
"utils"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "7221d5d39f3289fb9f4ccd96c18fd8dcddb79831860e57f4627f077c9f29bef9",
"md5": "c256daa345b8f957923539d91bd50403",
"sha256": "46cfe6c8c0c77ee42b3b68d837f3a3a952317f0a8f3a314289a5bd6f4efc5eda"
},
"downloads": -1,
"filename": "github_actions_utils-0.6.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "c256daa345b8f957923539d91bd50403",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.10",
"size": 6820,
"upload_time": "2023-11-27T21:23:50",
"upload_time_iso_8601": "2023-11-27T21:23:50.946470Z",
"url": "https://files.pythonhosted.org/packages/72/21/d5d39f3289fb9f4ccd96c18fd8dcddb79831860e57f4627f077c9f29bef9/github_actions_utils-0.6.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "def631dbdd2f6542c6dabd0eac33d2d29e3cd693a681dba1597aa8372f9abd81",
"md5": "b85f00749a42706cc77c34817d2e9426",
"sha256": "905a0d7e7b0d33022bcf135bb1ee0cf6bd2b46676285ad70053dfd45be45fad8"
},
"downloads": -1,
"filename": "github_actions_utils-0.6.0.tar.gz",
"has_sig": false,
"md5_digest": "b85f00749a42706cc77c34817d2e9426",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.10",
"size": 8075,
"upload_time": "2023-11-27T21:23:52",
"upload_time_iso_8601": "2023-11-27T21:23:52.630990Z",
"url": "https://files.pythonhosted.org/packages/de/f6/31dbdd2f6542c6dabd0eac33d2d29e3cd693a681dba1597aa8372f9abd81/github_actions_utils-0.6.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-27 21:23:52",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "heitorpolidoro",
"github_project": "github_actions_utils",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [],
"lcname": "github-actions-utils"
}