From 1e8fc873f59c2b4a4b58fd30e4d8bdd4f5633650 Mon Sep 17 00:00:00 2001 From: Marco Maatz Date: Thu, 16 Jan 2025 10:55:49 +0100 Subject: [PATCH] release with download url --- .gitea/workflows/deployArtifactToWebserver.yaml | 10 +++++++++- .gitea/workflows/updateRelease.yaml | 7 +++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/.gitea/workflows/deployArtifactToWebserver.yaml b/.gitea/workflows/deployArtifactToWebserver.yaml index 034df58..4ce5456 100644 --- a/.gitea/workflows/deployArtifactToWebserver.yaml +++ b/.gitea/workflows/deployArtifactToWebserver.yaml @@ -20,16 +20,22 @@ on: txtFileName: required: false type: string + outputs: + downloadUrl: + description: "Url to Download the file" + value: ${{ jobs.DeployToWebserver.outputs.downloadUrl }} jobs: DeployToWebserver: runs-on: ubuntu-latest + outputs: + downloadUrl: ${{ steps.Upload.outputs.downloadUrl }} steps: - name: Load Artifact uses: actions/download-artifact@v3 with: name: ${{ inputs.artifactName }} path: ./ - - name: Upload + - id: Upload run: | upload_name=${{ inputs.fileName }} @@ -52,4 +58,6 @@ jobs: echo "No additional text file to upload." fi + downloadUrl="${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/$upload_name" + echo "downloadUrl=$downloadUrl" >> $GITHUB_OUTPUT echo "Deploy upload done" \ No newline at end of file diff --git a/.gitea/workflows/updateRelease.yaml b/.gitea/workflows/updateRelease.yaml index 7119e90..0c1b425 100644 --- a/.gitea/workflows/updateRelease.yaml +++ b/.gitea/workflows/updateRelease.yaml @@ -11,6 +11,9 @@ on: repo: required: true type: string + downloadUrl: + required: false + type: string artifactName: required: false type: string @@ -63,11 +66,11 @@ jobs: if [ "$update_milestone_id" != "null" ]; then echo "Milestone named '${{ inputs.milestoneName }}' found with id $update_milestone_id." - description="https://gitea.greyhound-software.com/$OWNER/${{ inputs.repo }}/milestone/$update_milestone_id" + milestoneUrl="https://gitea.greyhound-software.com/$OWNER/${{ inputs.repo }}/milestone/$update_milestone_id" release_update=$(curl -s -X PATCH -H "Authorization: token $API_TOKEN" \ -H "Content-Type: application/json" \ - -d "{\"body\": \"$description\", \"name\": \"${{ inputs.milestoneName }}\"}" \ + -d "{\"body\": \"$milestoneUrl \n${{ inputs.downloadUrl }}\", \"name\": \"${{ inputs.milestoneName }}\"}" \ "$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/$release_id") fi