From 1dcd939bc1e3ce96ddbecdac6e32f38aecedf530 Mon Sep 17 00:00:00 2001 From: Michel Roux Date: Tue, 18 May 2021 15:27:19 +0200 Subject: [PATCH] Fix upload --- .drone.yml | 9 +++------ upload.sh | 2 +- 2 files changed, 4 insertions(+), 7 deletions(-) diff --git a/.drone.yml b/.drone.yml index b0ace92..8fee5a5 100644 --- a/.drone.yml +++ b/.drone.yml @@ -18,16 +18,13 @@ steps: image: debian commands: - apt-get update - - apt-get install -y --no-install-recommends calibre + - apt-get install -y --no-install-recommends calibre curl - bash -x convert.sh - - name: upload - image: curlimages/curl - commands: - bash -x upload.sh environment: - USER: + USERNAME: from_secret: nextcloud_user - PASS: + PASSWORD: from_secret: nextcloud_password --- diff --git a/upload.sh b/upload.sh index 9ddc2a0..8480575 100644 --- a/upload.sh +++ b/upload.sh @@ -2,5 +2,5 @@ for FILE in output/* do - curl -Ss -u "${USER}":"${PASS}" -T "${FILE}" "https://cloud.crystalyx.net/remote.php/dav/files/${USER}/Public/TWI/${FILE##*/}" + curl -Ss -u "${USERNAME}":"${PASSWORD}" -T "${FILE}" "https://cloud.crystalyx.net/remote.php/dav/files/${USERNAME}/Public/TWI/${FILE##*/}" done