From 259ce76c9ba71d98d6f63ee7d28b4a8eda82d342 Mon Sep 17 00:00:00 2001 From: Marco Maatz Date: Thu, 24 Oct 2024 11:43:24 +0200 Subject: [PATCH] check both vars --- .gitea/workflows/uploadArtifactWithFtp.yaml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/.gitea/workflows/uploadArtifactWithFtp.yaml b/.gitea/workflows/uploadArtifactWithFtp.yaml index 667d1c9..a8fb46c 100644 --- a/.gitea/workflows/uploadArtifactWithFtp.yaml +++ b/.gitea/workflows/uploadArtifactWithFtp.yaml @@ -44,10 +44,12 @@ jobs: echo "Uploading finished $upload_name" echo "TXT Filename is ${{ inputs.txtFileName }}" - if [ -n "${{ inputs.txtFileName }}"]; then + if [ -n "${{ inputs.txtFileName }}" ] && [ -n "${{ inputs.txtFileContent }}" ]; then echo "Uploading additional Text File ${{ inputs.txtFileName }}" printf "%b" "${{ inputs.txtFileContent }}" > ${{ inputs.txtFileName }} curl -T ./${{ inputs.txtFileName }} ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" + else + echo "No additional text file to upload." fi echo "Ftp Upload done" \ No newline at end of file