21 lines
507 B
Python
21 lines
507 B
Python
__author__ = 'RemiZOffAlex'
|
|
__email__ = 'remizoffalex@mail.ru'
|
|
|
|
import json
|
|
|
|
from os import getenv
|
|
|
|
|
|
def handle_config(config):
|
|
INPUT_REF = getenv('INPUT_REF')
|
|
if len(INPUT_REF)==0:
|
|
config['ref'] = getenv('GITHUB_REF_NAME')
|
|
else:
|
|
config['ref'] = INPUT_REF
|
|
|
|
config['github.event.path'] = getenv('GITHUB_EVENT_PATH')
|
|
with open(config['github.event.path'], 'r') as fd:
|
|
data = json.load(fd)
|
|
pretty_json = json.dumps(data, indent=4)
|
|
print(pretty_json)
|