Skip to content

Commit c7d091b

Browse files
feat: add vars context
1 parent 5bdb063 commit c7d091b

File tree

4 files changed

+9
-2
lines changed

4 files changed

+9
-2
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,7 @@ jobs:
8484
context:
8585
- github
8686
- env
87+
- vars
8788
- job
8889
- steps
8990
- runner

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ This action prints actions contexts for debugging
77
with:
88
# Optional
99
# Specify which contexts to print
10-
# Default: 'github,env,job,steps,runner,secrets,strategy,matrix,needs,inputs'
10+
# Default: 'github,env,vars,job,steps,runner,secrets,strategy,matrix,needs,inputs'
1111
contexts: ''
1212

1313
# Optional
@@ -45,6 +45,7 @@ job:
4545
context:
4646
- github
4747
- env
48+
- vars
4849
- job
4950
- steps
5051
- runner

action.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ inputs:
99
contexts:
1010
description: 'Contexts to dump'
1111
required: false
12-
default: 'github,env,job,steps,runner,secrets,strategy,matrix,needs,inputs'
12+
default: 'github,env,vars,job,steps,runner,secrets,strategy,matrix,needs,inputs'
1313
secrets_context:
1414
description: 'Secrets Context'
1515
required: false
@@ -26,6 +26,7 @@ runs:
2626
env:
2727
GITHUB_CONTEXT: ${{ toJson(github) }}
2828
ENV_CONTEXT: ${{ toJson(env) }}
29+
VARS_CONTEXT: ${{ toJson(vars) }}
2930
JOB_CONTEXT: ${{ toJson(job) }}
3031
STEPS_CONTEXT: ${{ toJson(steps) }}
3132
RUNNER_CONTEXT: ${{ toJson(runner) }}

debug_action.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,10 @@ do
1616
echo -e "\033[1;33m>>>>>> Env Context\033[0m"
1717
echo -e "$ENV_CONTEXT"
1818
echo -e "\033[1;33m<<<<<< Env Context\033[0m"
19+
elif [ $x == 'vars' ]; then
20+
echo -e "\033[1;33m>>>>>> Vars Context\033[0m"
21+
echo -e "$VARS_CONTEXT"
22+
echo -e "\033[1;33m<<<<<< Vars Context\033[0m"
1923
elif [ $x == 'job' ]; then
2024
echo -e "\033[1;33m>>>>>> Job Context\033[0m"
2125
echo -e "$JOB_CONTEXT"

0 commit comments

Comments
 (0)