2026-03-16 22:29:20 +03:00
|
|
|
__author__ = 'RemiZOffAlex'
|
|
|
|
|
__email__ = 'remizoffalex@mail.ru'
|
|
|
|
|
|
2026-03-19 22:45:07 +03:00
|
|
|
import json
|
|
|
|
|
|
2026-03-16 22:29:20 +03:00
|
|
|
from os import getenv
|
|
|
|
|
|
2026-03-19 22:45:07 +03:00
|
|
|
|
2026-03-16 22:29:20 +03:00
|
|
|
def handle_config(config):
|
|
|
|
|
INPUT_REF = getenv('INPUT_REF')
|
|
|
|
|
if len(INPUT_REF)==0:
|
2026-03-16 23:02:07 +03:00
|
|
|
config['ref'] = getenv('GITHUB_REF_NAME')
|
2026-03-16 22:29:20 +03:00
|
|
|
else:
|
2026-03-16 23:02:07 +03:00
|
|
|
config['ref'] = INPUT_REF
|
2026-03-19 22:33:43 +03:00
|
|
|
|
|
|
|
|
config['github.event.path'] = getenv('GITHUB_EVENT_PATH')
|
2026-03-19 22:38:09 +03:00
|
|
|
with open(config['github.event.path'], 'r') as fd:
|
2026-03-19 22:45:07 +03:00
|
|
|
data = json.load(fd)
|
2026-03-19 22:45:55 +03:00
|
|
|
pretty_json = json.dumps(data, indent=4)
|
|
|
|
|
print(pretty_json)
|