ci: ensure canonical naxos-installer-x86_64-linux.iso is published and attached to release
Test NaxOS Module Configurations / test-modules (push) Successful in 9m1s
Test NaxOS Module Configurations / test-modules (push) Successful in 9m1s
This commit is contained in:
@@ -51,11 +51,19 @@ jobs:
|
||||
TOKEN="${{ secrets.GITEA_TOKEN }}"
|
||||
fi
|
||||
ISO_NAME=$(basename "$ISO_FILE")
|
||||
echo "Publishing $ISO_NAME to Gitea Packages..."
|
||||
echo "Publishing $ISO_NAME and naxos-installer-x86_64-linux.iso to Gitea Packages..."
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/naxos-installer-x86_64-linux.iso" || true
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/$ISO_NAME" || true
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer/latest/naxos-installer-x86_64-linux.iso" || true
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
|
||||
@@ -67,7 +67,20 @@ jobs:
|
||||
fi
|
||||
|
||||
ISO_NAME=$(basename "$ISO_FILE")
|
||||
echo "Publishing $ISO_NAME to Gitea Packages..."
|
||||
echo "Publishing $ISO_NAME and naxos-installer-x86_64-linux.iso to Gitea Packages..."
|
||||
|
||||
# Publish canonical ISO name requested by users
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/naxos-installer-x86_64-linux.iso" || echo "Canonical ISO already exists"
|
||||
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE.sha256" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/naxos-installer-x86_64-linux.iso.sha256" || echo "Canonical Checksum already exists"
|
||||
|
||||
# Publish versioned Nix-generated filename
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
@@ -77,3 +90,20 @@ jobs:
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE.sha256" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer-iso/1.0.0/$ISO_NAME.sha256" || echo "Checksum already exists"
|
||||
|
||||
# Publish latest channel
|
||||
curl -s -X PUT \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
--upload-file "$ISO_FILE" \
|
||||
"${{ github.server_url }}/api/packages/naxos/generic/naxos-installer/latest/naxos-installer-x86_64-linux.iso" || true
|
||||
|
||||
# Attach asset to Gitea release v1.0.0 if present
|
||||
RELEASE_ID=$(curl -s -H "Authorization: token ${TOKEN}" "${{ github.server_url }}/api/v1/repos/naxos/naxos-os/releases/tags/v1.0.0" | jq -r '.id // empty')
|
||||
if [ -n "$RELEASE_ID" ]; then
|
||||
echo "Attaching ISO to Gitea Release v1.0.0 (ID: $RELEASE_ID)..."
|
||||
curl -s -X POST \
|
||||
-H "Authorization: token ${TOKEN}" \
|
||||
-H "Content-Type: multipart/form-data" \
|
||||
-F "attachment=@$ISO_FILE;filename=naxos-installer-x86_64-linux.iso" \
|
||||
"${{ github.server_url }}/api/v1/repos/naxos/naxos-os/releases/$RELEASE_ID/assets?name=naxos-installer-x86_64-linux.iso" || true
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user