-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaction.yml
60 lines (51 loc) · 1.81 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
47
48
49
50
51
52
53
54
55
56
57
58
59
name: Supersimple Configuration Uploader
description: Upload YAML configuration to Supersimple
inputs:
account_id:
description: Supersimple account ID
required: true
token:
description: Supersimple API token
required: true
api_url:
description: Supersimple API URL
required: false
default: https://app.supersimple.io
validate_dangling:
description: Validate dangling objects in Supersimple
required: false
default: "false"
delete_dangling:
description: Delete dangling objects in Supersimple
required: false
default: "false"
config_file:
description: Path to configuration file
required: false
default: ./supersimple.yaml
runs:
using: composite
steps:
- shell: bash
env:
SUPERSIMPLE_TOKEN: ${{ inputs.token }}
SUPERSIMPLE_ACCOUNT_ID: ${{ inputs.account_id }}
SUPERSIMPLE_HOST: ${{ inputs.api_url }}
SUPERSIMPLE_CONFIG_FILE: ${{ inputs.config_file }}
run: |
echo "Uploading $SUPERSIMPLE_CONFIG_FILE:"
echo " Account ID: $SUPERSIMPLE_ACCOUNT_ID"
echo " Supersimple host: $SUPERSIMPLE_HOST"
wget -q https://assets.supersimple.io/supersimple-cli/releases/v2.9.3/supersimple-x86_64-linux-gnu
chmod +x supersimple-x86_64-linux-gnu
if [ "${{ inputs.validate_dangling }}" = "true" ]; then
./supersimple-x86_64-linux-gnu validate $SUPERSIMPLE_CONFIG_FILE --validate-dangling
else
./supersimple-x86_64-linux-gnu validate $SUPERSIMPLE_CONFIG_FILE
fi
if [ "${{ inputs.delete_dangling }}" = "true" ]; then
./supersimple-x86_64-linux-gnu import $SUPERSIMPLE_CONFIG_FILE --delete-dangling
else
./supersimple-x86_64-linux-gnu import $SUPERSIMPLE_CONFIG_FILE
fi
rm supersimple-x86_64-linux-gnu