11name : Print Workflow Data
2- description : " prints select github context for debugging purposes"
2+ description : ' prints select github context for debugging purposes'
33
44branding :
55 color : ' green'
66 icon : ' bar-chart-2'
77
88inputs :
99 caller-inputs :
10- description : ' `caller-inputs: {{ toJSON(inputs) }}`'
10+ description : ' `caller-inputs: $ {{ toJSON(inputs) }}`'
1111 required : false
1212 default : ' '
1313 caller-needs :
14- description : ' `caller-needs: {{ toJSON(needs) }}`'
14+ description : ' `caller-needs: $ {{ toJSON(needs) }}`'
1515 required : false
1616 default : ' '
1717 caller-vars :
18- description : ' pass via `caller-vars: {{ toJSON(vars) }}` (generally safe unless secrets have been mismanaged)'
18+ description : ' pass via `caller-vars: $ {{ toJSON(vars) }}` (generally safe unless secrets have been mismanaged)'
1919 required : false
2020 default : ' '
2121 extras :
@@ -24,57 +24,20 @@ inputs:
2424 default : ' '
2525
2626runs :
27- using : " composite"
27+ using : ' composite'
2828 steps :
2929 - name : Print Workflow Data
3030 shell : bash
3131 continue-on-error : true
3232 env :
33+ TRIGGERING_ACTOR : ${{ github.triggering_actor }}
34+ EVENT_ACTION : ${{ github.event.action }}
35+ DEFAULT_BRANCH : ${{ github.event && github.event.repository && github.event.repository.default_branch }}
3336 MATRIX_CONTEXT : ${{ matrix && toJSON(matrix) || 'n/a' }}
3437 JOB_CONTEXT : ${{ toJSON(job) }}
3538 RUNNER_CONTEXT : ${{ toJSON(runner) }}
3639 CALLER_INPUTS : ${{ inputs.caller-inputs != '' && inputs.caller-inputs || 'n/a' }}
3740 CALLER_NEEDS : ${{ inputs.caller-needs != '' && inputs.caller-needs || 'n/a' }}
3841 CALLER_VARS : ${{ inputs.caller-vars != '' && inputs.caller-vars || 'n/a' }}
3942 EXTRAS : ${{ inputs.extras != '' && inputs.extras || 'n/a' }}
40- DEFAULT_BRANCH : ${{ github.event && github.event.repository && github.event.repository.default_branch }}
41- run : |
42- print_section() {
43- local title="$1"
44- local body="$2"
45- local color=92 # bright green
46- local bar_len=$(( ${#title} + 2 ))
47- echo -e "\e[1;${color}m┌$(printf '─%.0s' $(seq 1 $bar_len))┐\e[0m"
48- echo -e "\e[1;${color}m│ ${title} │\e[0m"
49- echo -e "\e[1;${color}m└$(printf '─%.0s' $(seq 1 $bar_len))┘\e[0m"
50- echo -e "$body"
51- }
52-
53- github_context_body=$(cat <<EOF
54- github.actor : ${{ github.actor }}
55- github.triggering_actor : ${{ github.triggering_actor }}
56- github.workflow : ${{ github.workflow }}
57- github.workflow_ref : ${{ github.workflow_ref }}
58- github.run_id : ${{ github.run_id }}
59- github.run_number : ${{ github.run_number }}
60- github.run_attempt : ${{ github.run_attempt }}
61- github.event_name : ${{ github.event_name }}
62- github.event.action : ${{ github.event.action }}
63- github.base_ref : ${{ github.base_ref }}
64- github.head_ref : ${{ github.head_ref }}
65- is_default_branch : ${{ github.ref_name == env.DEFAULT_BRANCH }}
66- is_default_target : ${{ github.base_ref == env.DEFAULT_BRANCH }}
67- github.ref : ${{ github.ref }}
68- github.ref_name : ${{ github.ref_name }}
69- github.sha : ${{ github.sha }}
70- EOF
71- )
72-
73- print_section "github context" "$github_context_body"
74- print_section "matrix context" "$MATRIX_CONTEXT"
75- print_section "job context" "$JOB_CONTEXT"
76- print_section "runner context" "$RUNNER_CONTEXT"
77- print_section "caller inputs" "$CALLER_INPUTS"
78- print_section "caller needs" "$CALLER_NEEDS"
79- print_section "caller vars" "$CALLER_VARS"
80- print_section "extras" "$EXTRAS"
43+ run : ${{ github.action_path }}/action.sh
0 commit comments