We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 31e2dc7 commit fcfb02dCopy full SHA for fcfb02d
3 files changed
Dockerfile
@@ -1,5 +1,5 @@
1
FROM dinutac/jinja2docker:2.1.3
2
3
-COPY entrypoint.sh /entrypoint.sh
+COPY entrypoint.py /entrypoint.py
4
5
-ENTRYPOINT ["/entrypoint.sh"]
+ENTRYPOINT ["/entrypoint.py"]
entrypoint.py
@@ -0,0 +1,23 @@
+#!/usr/bin/env python3
+
+import os
+import re
+import subprocess
6
7
+flags = []
8
9
+variables = re.compile('\n+', re.MULTILINE).sub(
10
+ ',',
11
+ os.environ['INPUT_VARIABLES']
12
+)
13
14
+if os.environ.get('INPUT_STRICT') == 'true':
15
+ flags.append('--strict')
16
17
+flags.extend([
18
+ os.environ['INPUT_TEMPLATE'],
19
+ '-D', variables,
20
+ '-o', os.environ['INPUT_OUTPUT_FILE']
21
+])
22
23
+subprocess.run(['jinja2'] + flags)
entrypoint.sh
0 commit comments