1
0

check both vars

This commit is contained in:
Marco Maatz 2024-10-24 11:43:24 +02:00
parent eb9c425d7c
commit 259ce76c9b

View File

@ -44,10 +44,12 @@ jobs:
echo "Uploading finished $upload_name" echo "Uploading finished $upload_name"
echo "TXT Filename is ${{ inputs.txtFileName }}" 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 }}" echo "Uploading additional Text File ${{ inputs.txtFileName }}"
printf "%b" "${{ inputs.txtFileContent }}" > ${{ 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 }}" 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 fi
echo "Ftp Upload done" echo "Ftp Upload done"