From 4ad2d2dadde59e6458a168c737bc7fe43d2aa080 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Gr=C3=BCnbaum?= Date: Tue, 14 Apr 2020 16:27:26 +0200 Subject: [PATCH] Support data_file This commit adds support for a data_file argument to the action. It also fixes a bug where the Subprocess exit code wouldn't be used by the GitHub action. --- action.yml | 4 +++- entrypoint.py | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/action.yml b/action.yml index 4e67434..2b054b8 100644 --- a/action.yml +++ b/action.yml @@ -9,7 +9,9 @@ inputs: required: false default: false variables: - required: true + required: false + data_file: + required: false runs: using: 'docker' image: 'Dockerfile' diff --git a/entrypoint.py b/entrypoint.py index 441dc61..b176774 100755 --- a/entrypoint.py +++ b/entrypoint.py @@ -16,4 +16,6 @@ params.extend(['-o', os.environ['INPUT_OUTPUT_FILE']]) -subprocess.run(['jinja2'] + params) +params.extend([os.environ.get('INPUT_DATA_FILE','')]) + +subprocess.run(['jinja2'] + params, check = True)