I have this in my main src action (not in the include file) and it causes an error:
env:
GITHUB_CONTEXT: ${{ toJSON(github) }}
Error dump is:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "/usr/local/lib/python3.9/runpy.py", line 87, in _run_code
exec(code, run_globals)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__main__.py", line 25, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 1032, in main
out_data = expand_workflow(current_action, to_path, insert_check)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 917, in expand_workflow
data = yaml_load(current_workflow, '\n'.join(workflow_data))
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 818, in yaml_load
return yaml.load(yaml_data, Loader=RoundTripLoaderWithExp)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/main.py", line 1071, in load
return loader._constructor.get_single_data()
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 122, in get_single_data
return self.construct_document(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 132, in construct_document
for _dummy in generator:
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1617, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 730, in construct_mapping
return RoundTripConstructor.construct_mapping(self, node, maptyp, deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1500, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 155, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 197, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1617, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 730, in construct_mapping
return RoundTripConstructor.construct_mapping(self, node, maptyp, deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1500, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 155, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 197, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1617, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 730, in construct_mapping
return RoundTripConstructor.construct_mapping(self, node, maptyp, deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1500, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 155, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 197, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1609, in construct_yaml_seq
data.extend(self.construct_rt_sequence(node, data))
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1341, in construct_rt_sequence
ret_val.append(self.construct_object(child, deep=deep))
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 155, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 197, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1617, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 730, in construct_mapping
return RoundTripConstructor.construct_mapping(self, node, maptyp, deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1500, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 155, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 197, in construct_non_recursive_object
for _dummy in generator:
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1617, in construct_yaml_map
self.construct_mapping(node, data, deep=True)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 730, in construct_mapping
return RoundTripConstructor.construct_mapping(self, node, maptyp, deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 1500, in construct_mapping
value = self.construct_object(value_node, deep=deep)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 155, in construct_object
data = self.construct_non_recursive_object(node)
File "/usr/local/lib/python3.9/site-packages/ruamel/yaml/constructor.py", line 190, in construct_non_recursive_object
data = constructor(self, node)
File "/usr/local/lib/python3.9/site-packages/actions_includes/__init__.py", line 687, in construct_expression
v = exp.parse(v)
File "/usr/local/lib/python3.9/site-packages/actions_includes/expressions.py", line 1346, in parse
return simplify(exp[3:-2].strip())
File "/usr/local/lib/python3.9/site-packages/actions_includes/expressions.py", line 1301, in simplify
o = tokens_eval(tokenizer(exp), context)
File "/usr/local/lib/python3.9/site-packages/actions_includes/expressions.py", line 373, in tokens_eval
assert not isinstance(t, list), t
AssertionError: [<class 'exp.ToJSONF'>, Value(github)]