Test workflow

This commit is contained in:
Michel Roegl-Brunner
2026-03-11 15:29:54 +01:00
parent 2a79253118
commit 262a3a72f4
2 changed files with 51 additions and 1 deletions

View File

@@ -258,12 +258,18 @@ jobs:
var scriptId = JSON.parse(r.body).id;
var resolved = await resolveNotesAndInstallMethods(scriptId);
console.log('Created', resolved.noteIds.length, 'notes,', resolved.installMethodIds.length, 'install_methods for slug=' + data.slug);
var patchPayload = {};
for (var k in payload) patchPayload[k] = payload[k];
patchPayload.notes = resolved.noteIds;
patchPayload.install_methods = resolved.installMethodIds;
var patchRes = await request(recordsUrl + '/' + scriptId, {
method: 'PATCH',
headers: { 'Authorization': token, 'Content-Type': 'application/json' },
body: JSON.stringify({ install_methods: resolved.installMethodIds, notes: resolved.noteIds })
body: JSON.stringify(patchPayload)
});
if (!patchRes.ok) throw new Error('PATCH relations failed: ' + patchRes.body);
var patched = JSON.parse(patchRes.body);
console.log('Script linked: notes=' + (patched.notes && patched.notes.length) + ', install_methods=' + (patched.install_methods && patched.install_methods.length));
}
}
console.log('Done.');

View File

@@ -0,0 +1,44 @@
{
"name": "TEST2",
"slug": "test2",
"categories": [
12
],
"date_created": "2026-01-18",
"type": "ct",
"updateable": true,
"privileged": false,
"interface_port": 3010,
"documentation": "https://affine.pro/docs",
"website": "https://affine.pro/",
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons@main/webp/affine.webp",
"config_path": "/opt/affine/.env",
"description": "Open-source, privacy-first workspa ce for notes, docs, and knowledge management with offline-first design and end-to-end encryption.",
"install_methods": [
{
"type": "default",
"script": "ct/affine.sh",
"resources": {
"cpu": 4,
"ram": 12288,
"hdd": 20,
"os": "Debian",
"version": "13"
}
}
],
"default_credentials": {
"username": null,
"password": null
},
"notes": [
{
"text": "Initial build takes 20-30 minutes due to native module compilation.",
"type": "info"
},
{
"text": "Requires at least 8GB RAM for building and 4GB for runtime.",
"type": "warning"
}
]
}