From a439d7aa64fb4ed7e34e7389d85bf0e29c3b2c75 Mon Sep 17 00:00:00 2001 From: Ralph Lange Date: Fri, 19 Jun 2020 12:21:12 +0200 Subject: [PATCH] cue: add fold control for gh-actions --- cue.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/cue.py b/cue.py index c090ed0..6a9b737 100644 --- a/cue.py +++ b/cue.py @@ -169,11 +169,16 @@ ANSI_CLEAR = "\033[0K" # Travis log fold control # from https://github.com/travis-ci/travis-rubies/blob/build/build.sh +# GitHub Actions fold control +# from https://github.com/actions/toolkit/blob/master/docs/commands.md#group-and-ungroup-log-lines def fold_start(tag, title): if ci['service'] == 'travis': print('travis_fold:start:{0}{1}{2}{3}' .format(tag, ANSI_YELLOW, title, ANSI_RESET)) + elif ci['service'] == 'github-actions': + print('::group::{0}{1}{2}' + .format(ANSI_YELLOW, title, ANSI_RESET)) elif ci['service'] == 'appveyor': print('{0}===== \\/ \\/ \\/ ===== START: {1} ====={2}' .format(ANSI_YELLOW, title, ANSI_RESET)) @@ -184,6 +189,9 @@ def fold_end(tag, title): if ci['service'] == 'travis': print('\ntravis_fold:end:{0}\r' .format(tag), end='') + elif ci['service'] == 'github-actions': + print('::endgroup::' + .format(ANSI_YELLOW, title, ANSI_RESET)) elif ci['service'] == 'appveyor': print('{0}----- /\\ /\\ /\\ ----- END: {1} -----{2}' .format(ANSI_YELLOW, title, ANSI_RESET))