1
0

release with download url

This commit is contained in:
Marco Maatz 2025-01-16 10:55:49 +01:00
parent 1b48f4722f
commit 1e8fc873f5
2 changed files with 14 additions and 3 deletions

View File

@ -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"

View File

@ -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