forked from KosmosisDire/obsidian-webpage-export
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
46 lines (37 loc) · 1.18 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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
name: "Export Obsidian vault to HTML"
description: "Exports the Obsidian vault to HTML"
inputs:
vault:
description: "Path to the Obsidian vault"
required: true
default: "."
config:
description: "Path to the configuration file"
required: false
version:
description: "Version of the plugin"
required: false
default: "latest"
outputs:
output:
description: "Path to the output folder"
value: ${{ steps.run-docker.outputs.output }}
runs:
using: "composite"
steps:
- name: Run docker container
id: run-docker
shell: bash
run: |
set +e
mkdir -p ./.output
if [ -z "${{ inputs.config }}" ]; then
docker run --rm -v ${{ inputs.vault }}:/vault -v ./.output:/output KosmosisDire/obsidian-webpage-export:${{ inputs.version }} >> ./.log.txt
else
docker run --rm -v ${{ inputs.vault }}:/vault -v ${{ inputs.config }}:/config.json -v ./.output:/output KosmosisDire/obsidian-webpage-export:${{ inputs.version }} >> ./.log.txt
fi
cat ./.log.txt
if [ $? -eq 137 ]; then
exit 0
echo "output=./.output" >> $GITHUB_OUTPUT
fi