v1
This commit is contained in:
+37
@@ -0,0 +1,37 @@
|
||||
name: "Stapler Deploy"
|
||||
description: "Deploy directory to Stapler instance"
|
||||
|
||||
inputs:
|
||||
path:
|
||||
description: "directory path to deploy"
|
||||
required: true
|
||||
default: "."
|
||||
token:
|
||||
description: "Stapler token"
|
||||
required: true
|
||||
host:
|
||||
description: "Stapler host"
|
||||
required: true
|
||||
default: "https://stapler.fr"
|
||||
target:
|
||||
description: "Stapler target path"
|
||||
required: true
|
||||
extra_curl_args:
|
||||
description: "Extra Curl args like: -H 'X-Host-Only: example.org'"
|
||||
default: ""
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
steps:
|
||||
- name: Compress files
|
||||
shell: bash
|
||||
run: tar -czC ${{ inputs.path }} -f /tmp/dist.tar.gz .
|
||||
|
||||
- name: Upload to Stapler server
|
||||
shell: bash
|
||||
run: |
|
||||
TARGET=$(echo ${{ inputs.target }}|rev|cut -d/ -f1|rev)
|
||||
curl -s -X PUT --fail-with-body --data-binary "@/tmp/dist.tar.gz" \
|
||||
-H 'X-Token: ${{ inputs.token }}' \
|
||||
${{ inputs.extra_curl_args }} \
|
||||
${{ inputs.host }}/$TARGET/
|
||||
Reference in New Issue
Block a user