From 621d3b0e4c0b89959ce274c4f9d691e562888b1a Mon Sep 17 00:00:00 2001 From: Marco Maatz Date: Thu, 24 Oct 2024 10:30:31 +0200 Subject: [PATCH] changing linefeed --- .gitea/workflows/uploadArtifactWithFtp.yaml | 95 +++++++++++---------- 1 file changed, 48 insertions(+), 47 deletions(-) diff --git a/.gitea/workflows/uploadArtifactWithFtp.yaml b/.gitea/workflows/uploadArtifactWithFtp.yaml index 19d059c..1dd0ffe 100644 --- a/.gitea/workflows/uploadArtifactWithFtp.yaml +++ b/.gitea/workflows/uploadArtifactWithFtp.yaml @@ -1,47 +1,48 @@ -name: Upload artifact With Ftp -on: - workflow_call: - inputs: - artifactName: - required: true - type: string - fileName: - required: true - type: string - uploadName: - required: false - type: string - ftpPath: - required: true - type: string - txtFileContent: - required: false - type: string - txtFileName: - required: false - type: string -jobs: - UploadFtp: - runs-on: ubuntu-latest - steps: - - name: Load Artifact - uses: actions/download-artifact@v3 - with: - name: ${{ inputs.artifactName }} - path: ./ - - name: Upload - run: | - upload_name=${{ inputs.fileName }} - - if [ "${{ inputs.uploadName }}" != "" ]; then - echo "Renaming file to ${{ inputs.uploadName }}" - mv ${{ inputs.fileName }} ${{ inputs.uploadName }} - upload_name=${{ inputs.uploadName }} - fi - - 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 }} - curl -T ./${{ inputs.txtFileName }} ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" - fi \ No newline at end of file +name: Upload artifact With Ftp +on: + workflow_call: + inputs: + artifactName: + required: true + type: string + fileName: + required: true + type: string + uploadName: + required: false + type: string + ftpPath: + required: true + type: string + txtFileContent: + required: false + type: string + txtFileName: + required: false + type: string +jobs: + UploadFtp: + runs-on: ubuntu-latest + steps: + - name: Load Artifact + uses: actions/download-artifact@v3 + with: + name: ${{ inputs.artifactName }} + path: ./ + - name: Upload + run: | + upload_name=${{ inputs.fileName }} + + if [ "${{ inputs.uploadName }}" != "" ]; then + echo "Renaming file to ${{ inputs.uploadName }}" + mv ${{ inputs.fileName }} ${{ inputs.uploadName }} + upload_name=${{ inputs.uploadName }} + fi + + 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 }} + curl -T ./${{ inputs.txtFileName }} ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" + fi + \ No newline at end of file