diff --git a/.gitea/workflows/uploadArtifactWithFtp.yaml b/.gitea/workflows/uploadArtifactWithFtp.yaml index 4cb2a51..19d059c 100644 --- a/.gitea/workflows/uploadArtifactWithFtp.yaml +++ b/.gitea/workflows/uploadArtifactWithFtp.yaml @@ -15,10 +15,10 @@ on: required: true type: string txtFileContent: - required: true + required: false type: string txtFileName: - required: true + required: false type: string jobs: UploadFtp: @@ -41,5 +41,7 @@ jobs: curl -T ./$upload_name ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" - printf "%b" "${{ inputs.txtFileContent }}" > ${{ inputs.txtFileName }} - curl -T ./${{ inputs.txtFileName }} ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" \ No newline at end of file + if [ "${{ inputs.txtFileName }}" != "" ]; then + printf "%b" "${{ inputs.txtFileContent }}" > ${{ inputs.txtFileName }} + curl -T ./${{ inputs.txtFileName }} ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" + fi \ No newline at end of file