generated from hadenlabs/action-docker-template
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
action.yml
41 lines (39 loc) · 1.24 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
name: hadenlabs-action-confluence-sync'
description: 'Action confluence sync that can be used to publish markdown documents to confluence.'
author: 'hadenlabs'
inputs:
confluence_url:
description: base url of confluence
required: true
confluence_username:
description: confluence username
required: true
confluence_token:
description: token of user
required: true
files:
description: files to sync
required: true
runs:
using: 'composite'
steps:
- name: Sync files to confluence.
uses: addnab/docker-run-action@v3
with:
image: kovetskiy/mark:latest
options: -v ${{ github.workspace }}:/github/workspace --workdir /github/workspace
run: |
echo "username = '${{ inputs.confluence_username }}'" >> ./config.toml
echo "password = '${{ inputs.confluence_token }}'" >> ./config.toml
echo "base_url = '${{ inputs.confluence_url }}'" >> ./config.toml
for file in ${{ inputs.files }}; do
if ! grep -F "<!-- Space:" $file; then
continue
fi
echo "> Sync $file";
mark --config ./config.toml -f ${file} || exit 1;
echo;
done
branding:
icon: 'check-circle'
color: 'green'