Skip to content

Commit

Permalink
patch: Add log groups to GH Actions API (#211)
Browse files Browse the repository at this point in the history
  • Loading branch information
carlcsaposs-canonical authored Jul 23, 2024
1 parent 60625c4 commit 7846e60
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions python/cli/data_platform_workflows_cli/github_actions/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,25 @@ def output(self, value: _OutputBaseType):
"""

sys.modules[__name__].__class__ = _ThisModule


def begin_group(title: str):
"""Begin an expandable group in the log
Anything printed to the log between `begin_group()` and `end_group()` is nested inside an
expandable entry in the log.
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
"""
print(f"::group::{title}")


def end_group():
"""End an expandable group in the log
Anything printed to the log between `begin_group()` and `end_group()` is nested inside an
expandable entry in the log.
https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#grouping-log-lines
"""
print("::endgroup::")

0 comments on commit 7846e60

Please sign in to comment.