Slowly making progress
All checks were successful
continuous-integration/drone/push Build is passing

- YAML is now valid - however, the attempt to temp store the revision number failed. Doing it inline instead.
This commit is contained in:
Kieron Morris 2025-03-09 22:08:18 +00:00
parent 0913daebc6
commit f1211f3cca

View File

@ -38,20 +38,17 @@ steps:
commands: commands:
- apk add --no-cache curl - apk add --no-cache curl
- chmod +w Asuro.iso - chmod +w Asuro.iso
- git rev-parse --short HEAD > commit_hash.txt - cp Asuro.iso "Asuro-$(git rev-parse --short HEAD).iso"
- COMMIT_HASH=$(cat commit_hash.txt) && cp Asuro.iso "Asuro-${COMMIT_HASH}.iso" - echo "Uploading Asuro-$(git rev-parse --short HEAD).iso to Gitea Packages..."
- COMMIT_HASH=$(cat commit_hash.txt) && echo "Uploading Asuro-${COMMIT_HASH}.iso to Gitea Packages..."
- | - |
COMMIT_HASH=$(cat commit_hash.txt) && \ curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/$(git rev-parse --short HEAD)/Asuro.iso" \
curl -X PUT "https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/${COMMIT_HASH}/Asuro.iso" \
-H 'Authorization: token $GITEA_TOKEN' \ -H 'Authorization: token $GITEA_TOKEN' \
--upload-file "Asuro-${COMMIT_HASH}.iso" --upload-file "Asuro-$(git rev-parse --short HEAD).iso"
- echo "Updating latest ISO reference..." - echo "Updating latest ISO reference..."
- | - |
curl -X DELETE https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso curl -X DELETE https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso
-H "Authorization: token $GITEA_TOKEN" || echo "No previous latest version found." -H "Authorization: token $GITEA_TOKEN" || echo "No previous latest version found."
- | - |
COMMIT_HASH=$(cat commit_hash.txt) && \
curl -X PUT https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso \ curl -X PUT https://gitea.spexeah.com/api/packages/Spexeah/generic/asuro-iso/latest/Asuro.iso \
-H "Authorization: token $GITEA_TOKEN" \ -H "Authorization: token $GITEA_TOKEN" \
--upload-file "Asuro-${COMMIT_HASH}.iso" --upload-file "Asuro-$(git rev-parse --short HEAD).iso"