release with download url
This commit is contained in:
parent
1b48f4722f
commit
1e8fc873f5
@ -20,16 +20,22 @@ on:
|
|||||||
txtFileName:
|
txtFileName:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
|
outputs:
|
||||||
|
downloadUrl:
|
||||||
|
description: "Url to Download the file"
|
||||||
|
value: ${{ jobs.DeployToWebserver.outputs.downloadUrl }}
|
||||||
jobs:
|
jobs:
|
||||||
DeployToWebserver:
|
DeployToWebserver:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
downloadUrl: ${{ steps.Upload.outputs.downloadUrl }}
|
||||||
steps:
|
steps:
|
||||||
- name: Load Artifact
|
- name: Load Artifact
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: ${{ inputs.artifactName }}
|
name: ${{ inputs.artifactName }}
|
||||||
path: ./
|
path: ./
|
||||||
- name: Upload
|
- id: Upload
|
||||||
run: |
|
run: |
|
||||||
upload_name=${{ inputs.fileName }}
|
upload_name=${{ inputs.fileName }}
|
||||||
|
|
||||||
@ -52,4 +58,6 @@ jobs:
|
|||||||
echo "No additional text file to upload."
|
echo "No additional text file to upload."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
downloadUrl="${{ vars.WEB_DEPLOY_URL }}${{ inputs.dir }}/$upload_name"
|
||||||
|
echo "downloadUrl=$downloadUrl" >> $GITHUB_OUTPUT
|
||||||
echo "Deploy upload done"
|
echo "Deploy upload done"
|
@ -11,6 +11,9 @@ on:
|
|||||||
repo:
|
repo:
|
||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
|
downloadUrl:
|
||||||
|
required: false
|
||||||
|
type: string
|
||||||
artifactName:
|
artifactName:
|
||||||
required: false
|
required: false
|
||||||
type: string
|
type: string
|
||||||
@ -63,11 +66,11 @@ jobs:
|
|||||||
if [ "$update_milestone_id" != "null" ]; then
|
if [ "$update_milestone_id" != "null" ]; then
|
||||||
echo "Milestone named '${{ inputs.milestoneName }}' found with id $update_milestone_id."
|
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" \
|
release_update=$(curl -s -X PATCH -H "Authorization: token $API_TOKEN" \
|
||||||
-H "Content-Type: application/json" \
|
-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")
|
"$GITEA_API_URL/repos/$OWNER/${{ inputs.repo }}/releases/$release_id")
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user