From 34da23de0a83ac0f602b41669766050094b29981 Mon Sep 17 00:00:00 2001 From: Marco Maatz Date: Thu, 24 Oct 2024 10:53:05 +0200 Subject: [PATCH] test --- .gitea/workflows/uploadArtifactWithFtp.yaml | 99 +++++++++++---------- 1 file changed, 50 insertions(+), 49 deletions(-) diff --git a/.gitea/workflows/uploadArtifactWithFtp.yaml b/.gitea/workflows/uploadArtifactWithFtp.yaml index be20d63..ae430ad 100644 --- a/.gitea/workflows/uploadArtifactWithFtp.yaml +++ b/.gitea/workflows/uploadArtifactWithFtp.yaml @@ -1,49 +1,50 @@ -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 - - echo "Uploading $upload_name" - curl -T ./$upload_name ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" - - if [ "${{ inputs.txtFileName }}" != "" ]; 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 }}" - fi +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 + + echo "Uploading $upload_name" + curl -T ./$upload_name ${{ vars.FTP_SERVER_URL }}${{ inputs.ftpPath }} --user "${{ vars.FTP_USER }}:${{ vars.FTP_PASSWORD }}" + echo "Uploading finished $upload_name" + + if [ "${{ inputs.txtFileName }}" != "" ]; 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 }}" + fi