build: Configure newly uploaded repository file share link
This commit is contained in:
@@ -120,6 +120,7 @@ jobs:
|
||||
-d '{"email": "${{ secrets.REPO_USERNAME }}", "password": "${{ secrets.REPO_PASSWORD }}"}' | \
|
||||
grep -oP 'connect\.sid=[^;]+' | head -n 1
|
||||
)
|
||||
|
||||
FILE_PATH="${{ steps.compress_image.outputs.image_path }}"
|
||||
FILE_NAME="$(basename "$FILE_PATH" | sed 's/-compacted//')"
|
||||
|
||||
@@ -128,8 +129,13 @@ jobs:
|
||||
--header "Cookie: $REPO_TOKEN" \
|
||||
--form "uploadTo=/Storage/Repository/rel" \
|
||||
--form "filedata=@${FILE_PATH};filename=${FILE_NAME}"
|
||||
curl -fsSL -X POST \
|
||||
http://nextexplorer.nextexplorer.svc.cluster.local:3000/api/shares \
|
||||
--header "Content-Type: application/json" \
|
||||
--header "Cookie: $REPO_TOKEN" \
|
||||
-d '{"sourcePath":"Storage/Repository/rel/$FILE_NAME"}'
|
||||
|
||||
curl -ksS -X PUT "https://lab-hv-vip.bessems.lan/v1/harvesterhci.io.virtualmachineimages" \
|
||||
curl -ksS -X POST "https://lab-hv-vip.bessems.lan/v1/harvesterhci.io.virtualmachineimages" \
|
||||
-H "Authorization: Bearer ${{ secrets.HV_TOKEN }}" \
|
||||
-H "Content-Type: application/json" \
|
||||
-d @- <<EOF
|
||||
@@ -139,7 +145,7 @@ jobs:
|
||||
"namespace": "default"
|
||||
},
|
||||
"spec": {
|
||||
"displayName": "ubuntu-${{ env.UBUNTU_VERSION }}-rke2-v${{ needs.semrel_dryrun.outputs.version }}",
|
||||
"displayName": "$FILE_NAME",
|
||||
"sourceType": "download",
|
||||
"url": "https://${{ secrets.REPO_USERNAME }}:${{ secrets.REPO_PASSWORD }}@sn.itch.fyi/Repository/rel/ubuntu-${{ env.UBUNTU_VERSION }}-rke2-v${{ needs.semrel_dryrun.outputs.version }}.img"
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user