Skip to content

Commit 758ccbf

Browse files
feat: colors (#10)
1 parent 5268739 commit 758ccbf

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

debug_action.sh

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#!/bin/bash
22

3-
echo -e '====== Dump Contexts ======'
3+
echo -e '\033[1;34m====== Dump Contexts ======\033[0m'
44

55
contexts=$(echo $1 | sed 's/[^A-Za-z,]//g' | tr '[:upper:]' '[:lower:]')
66

@@ -9,47 +9,47 @@ contexts_last=${contexts##*,}
99
for x in $(echo $contexts | tr ',' '\n')
1010
do
1111
if [ $x == 'github' ]; then
12-
echo -e '>>>>>> GitHub Context'
12+
echo -e '\033[1;33m>>>>>> GitHub Context\033[0m'
1313
echo -e "$GITHUB_CONTEXT"
14-
echo -e '<<<<<< GitHub Context'
14+
echo -e '\033[1;33m<<<<<< GitHub Context\033[0m'
1515
elif [ $x == 'env' ]; then
16-
echo -e '>>>>>> Env Context'
16+
echo -e '\033[1;33m>>>>>> Env Context\033[0m'
1717
echo -e "$ENV_CONTEXT"
18-
echo -e '<<<<<< Env Context'
18+
echo -e '\033[1;33m<<<<<< Env Context\033[0m'
1919
elif [ $x == 'job' ]; then
20-
echo -e '>>>>>> Job Context'
20+
echo -e '\033[1;33m>>>>>> Job Context\033[0m'
2121
echo -e "$JOB_CONTEXT"
22-
echo -e '<<<<<< Job Context'
22+
echo -e '\033[1;33m<<<<<< Job Context\033[0m'
2323
elif [ $x == 'steps' ]; then
24-
echo -e '>>>>>> Steps Context'
24+
echo -e '\033[1;33m>>>>>> Steps Context\033[0m'
2525
echo -e "$STEPS_CONTEXT"
26-
echo -e '<<<<<< Steps Context'
26+
echo -e '\033[1;33m<<<<<< Steps Context\033[0m'
2727
elif [ $x == 'runner' ]; then
28-
echo -e '>>>>>> Runner Context'
28+
echo -e '\033[1;33m>>>>>> Runner Context\033[0m'
2929
echo -e "$RUNNER_CONTEXT"
30-
echo -e '<<<<<< Runner Context'
30+
echo -e '\033[1;33m<<<<<< Runner Context\033[0m'
3131
elif [ $x == 'secrets' ]; then
32-
echo -e '>>>>>> Secrets Context'
32+
echo -e '\033[1;33m>>>>>> Secrets Context\033[0m'
3333
echo -e "$SECRETS_CONTEXT"
34-
echo -e '<<<<<< Secrets Context'
34+
echo -e '\033[1;33m<<<<<< Secrets Context\033[0m'
3535
elif [ $x == 'strategy' ]; then
36-
echo -e '>>>>>> Strategy Context'
36+
echo -e '\033[1;33m>>>>>> Strategy Context\033[0m'
3737
echo -e "$STRATGEY_CONTEXT"
38-
echo -e '<<<<<< Strategy Context'
38+
echo -e '\033[1;33m<<<<<< Strategy Context\033[0m'
3939
elif [ $x == 'matrix' ]; then
40-
echo -e '>>>>>> Matrix Context'
40+
echo -e '\033[1;33m>>>>>> Matrix Context\033[0m'
4141
echo -e "$MATRIX_CONTEXT"
42-
echo -e '<<<<<< Matrix Context'
42+
echo -e '\033[1;33m<<<<<< Matrix Context\033[0m'
4343
elif [ $x == 'needs' ]; then
44-
echo -e '>>>>>> Needs Context'
44+
echo -e '\033[1;33m>>>>>> Needs Context\033[0m'
4545
echo -e "$NEEDS_CONTEXT"
46-
echo -e '<<<<<< Needs Context'
46+
echo -e '\033[1;33m<<<<<< Needs Context\033[0m'
4747
elif [ $x == 'inputs' ]; then
48-
echo -e '>>>>>> Inputs Context'
48+
echo -e '\033[1;33m>>>>>> Inputs Context\033[0m'
4949
echo -e "$INPUTS_CONTEXT"
50-
echo -e '<<<<<< Inputs Context'
50+
echo -e '\033[1;33m<<<<<< Inputs Context\033[0m'
5151
else
52-
echo -e '======= Context NOT FOUND ======='
52+
echo -e '\033[1;31m======= Context NOT FOUND =======\033[0m'
5353
fi
5454
if [ ! $x == $contexts_last ]; then
5555
printf '\n\n\n'

0 commit comments

Comments
 (0)