-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
27 lines (27 loc) · 774 Bytes
/
action.yml
File metadata and controls
27 lines (27 loc) · 774 Bytes
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
name: tecnodeploy-action
description: "Deploya qualcosa all'interno del sistema di Tecno"
inputs:
file:
description: "File da deployare"
required: true
destination:
description: "Destinazione in cui deployare"
required: true
key:
description: "Chiave per deployare"
required: true
server:
description: "Server in cui deployare"
required: true
runs:
using: "composite"
steps:
- run: |
if [[ "${{ inputs.file }}" = "" ]]; then
exit 0
fi
sudo curl -F "key=${{ inputs.key }}" -F "file=@${{ inputs.file }}" -F "destination=${{ inputs.destination }}" http://${{ inputs.server }}/uploadFile | grep 'successo' &> /dev/null
if [ $? != 0 ]; then
exit 1
fi
shell: bash