1
0

txt file name not required

This commit is contained in:
Marco Maatz 2024-10-24 07:39:24 +02:00
parent 6627464583
commit 006ac980dc

View File

@ -15,10 +15,10 @@ on:
required: true required: true
type: string type: string
txtFileContent: txtFileContent:
required: true required: false
type: string type: string
txtFileName: txtFileName:
required: true required: false
type: string type: string
jobs: jobs:
UploadFtp: UploadFtp:
@ -41,5 +41,7 @@ jobs:
curl -T ./$upload_name ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" curl -T ./$upload_name ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}"
if [ "${{ inputs.txtFileName }}" != "" ]; then
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 }}"
fi