uch
This commit is contained in:
parent
ee50ac45e6
commit
fecf818d76
36
.gitea/workflows/transfertWithRenameWebserver.yaml
Normal file
36
.gitea/workflows/transfertWithRenameWebserver.yaml
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
name: Transfert with rename to Webserver
|
||||||
|
on:
|
||||||
|
workflow_call:
|
||||||
|
inputs:
|
||||||
|
downloadFile:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
uploadFile:
|
||||||
|
required: true
|
||||||
|
type: string
|
||||||
|
outputs:
|
||||||
|
downloadUrl:
|
||||||
|
description: "Url to Download the file"
|
||||||
|
value: ${{ jobs.TransfertWithRenameToWebserver.outputs.downloadUrl }}
|
||||||
|
jobs:
|
||||||
|
TransfertWithRenameToWebserver:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
outputs:
|
||||||
|
downloadUrl: ${{ steps.Download.outputs.downloadUrl }}
|
||||||
|
steps:
|
||||||
|
- name: Download
|
||||||
|
run: |
|
||||||
|
downloadUrl=${{ vars.WEB_DEPLOY_URL }}${{ inputs.downloadFile }}
|
||||||
|
uploadUrl=${{ vars.WEB_DEPLOY_URL }}${{ inputs.uploadFile }}
|
||||||
|
|
||||||
|
echo "Download URL: $downloadUrl"
|
||||||
|
curl -O $downloadUrl
|
||||||
|
|
||||||
|
echo "Renaming file to $uploadFileName"
|
||||||
|
mv $downloadFileName $uploadFileName
|
||||||
|
|
||||||
|
echo "Upload URL: $uploadUrl"
|
||||||
|
curl -H "Authorization: Bearer ${{ vars.WEB_DEPLOY_TOKEN }}" --data-binary @"$downloadFileName" "$uploadUrl"
|
||||||
|
|
||||||
|
echo "downloadUrl=$downloadUrl" >> $GITHUB_OUTPUT
|
||||||
|
echo "Deploy upload done"
|
Loading…
x
Reference in New Issue
Block a user