Skip to content

Commit

Permalink
feat: colors (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
henrygriffiths authored May 7, 2022
1 parent 5268739 commit 758ccbf
Showing 1 changed file with 22 additions and 22 deletions.
44 changes: 22 additions & 22 deletions debug_action.sh
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#!/bin/bash

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

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

Expand All @@ -9,47 +9,47 @@ contexts_last=${contexts##*,}
for x in $(echo $contexts | tr ',' '\n')
do
if [ $x == 'github' ]; then
echo -e '>>>>>> GitHub Context'
echo -e '\033[1;33m>>>>>> GitHub Context\033[0m'
echo -e "$GITHUB_CONTEXT"
echo -e '<<<<<< GitHub Context'
echo -e '\033[1;33m<<<<<< GitHub Context\033[0m'
elif [ $x == 'env' ]; then
echo -e '>>>>>> Env Context'
echo -e '\033[1;33m>>>>>> Env Context\033[0m'
echo -e "$ENV_CONTEXT"
echo -e '<<<<<< Env Context'
echo -e '\033[1;33m<<<<<< Env Context\033[0m'
elif [ $x == 'job' ]; then
echo -e '>>>>>> Job Context'
echo -e '\033[1;33m>>>>>> Job Context\033[0m'
echo -e "$JOB_CONTEXT"
echo -e '<<<<<< Job Context'
echo -e '\033[1;33m<<<<<< Job Context\033[0m'
elif [ $x == 'steps' ]; then
echo -e '>>>>>> Steps Context'
echo -e '\033[1;33m>>>>>> Steps Context\033[0m'
echo -e "$STEPS_CONTEXT"
echo -e '<<<<<< Steps Context'
echo -e '\033[1;33m<<<<<< Steps Context\033[0m'
elif [ $x == 'runner' ]; then
echo -e '>>>>>> Runner Context'
echo -e '\033[1;33m>>>>>> Runner Context\033[0m'
echo -e "$RUNNER_CONTEXT"
echo -e '<<<<<< Runner Context'
echo -e '\033[1;33m<<<<<< Runner Context\033[0m'
elif [ $x == 'secrets' ]; then
echo -e '>>>>>> Secrets Context'
echo -e '\033[1;33m>>>>>> Secrets Context\033[0m'
echo -e "$SECRETS_CONTEXT"
echo -e '<<<<<< Secrets Context'
echo -e '\033[1;33m<<<<<< Secrets Context\033[0m'
elif [ $x == 'strategy' ]; then
echo -e '>>>>>> Strategy Context'
echo -e '\033[1;33m>>>>>> Strategy Context\033[0m'
echo -e "$STRATGEY_CONTEXT"
echo -e '<<<<<< Strategy Context'
echo -e '\033[1;33m<<<<<< Strategy Context\033[0m'
elif [ $x == 'matrix' ]; then
echo -e '>>>>>> Matrix Context'
echo -e '\033[1;33m>>>>>> Matrix Context\033[0m'
echo -e "$MATRIX_CONTEXT"
echo -e '<<<<<< Matrix Context'
echo -e '\033[1;33m<<<<<< Matrix Context\033[0m'
elif [ $x == 'needs' ]; then
echo -e '>>>>>> Needs Context'
echo -e '\033[1;33m>>>>>> Needs Context\033[0m'
echo -e "$NEEDS_CONTEXT"
echo -e '<<<<<< Needs Context'
echo -e '\033[1;33m<<<<<< Needs Context\033[0m'
elif [ $x == 'inputs' ]; then
echo -e '>>>>>> Inputs Context'
echo -e '\033[1;33m>>>>>> Inputs Context\033[0m'
echo -e "$INPUTS_CONTEXT"
echo -e '<<<<<< Inputs Context'
echo -e '\033[1;33m<<<<<< Inputs Context\033[0m'
else
echo -e '======= Context NOT FOUND ======='
echo -e '\033[1;31m======= Context NOT FOUND =======\033[0m'
fi
if [ ! $x == $contexts_last ]; then
printf '\n\n\n'
Expand Down

0 comments on commit 758ccbf

Please sign in to comment.