-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
31 lines (31 loc) · 1.23 KB
/
action.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
name: 'Markdown'
description: 'Render a TCG Markdown document'
inputs:
input-md:
description: 'The name of the Markdown file to render'
required: true
output-pdf:
description: 'The name of the rendered PDF file'
output-html:
description: 'The name of the rendered HTML file'
output-docx:
description: 'The name of the rendered DOCX file'
output-tex:
description: 'The name of the rendered TEX file'
extra-build-options:
description: 'Additional build options to be passed to build.sh'
runs:
using: 'composite'
steps:
# let the container take ownership of the repo dir, in case the user wants to check in the results
# workaround to https://github.com/actions/runner/issues/2033
- run: chown -R $(id -u):$(id -g) $PWD
shell: sh
- run: >
/usr/bin/build.sh ${{ inputs.extra-build-options }}
$( [ -n "${{ inputs.output-pdf }}" ] && echo --pdf=${{ inputs.output-pdf }} )
$( [ -n "${{ inputs.output-html }}" ] && echo --html=${{ inputs.output-html }} )
$( [ -n "${{ inputs.output-docx }}" ] && echo --docx=${{ inputs.output-docx }} )
$( [ -n "${{ inputs.output-tex }}" ] && echo --latex=${{ inputs.output-tex }} )
${{ inputs.input-md }}
shell: sh