Test workflow
This commit is contained in:
8
.github/workflows/push_json_to_pocketbase.yml
generated
vendored
8
.github/workflows/push_json_to_pocketbase.yml
generated
vendored
@@ -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.');
|
||||
|
||||
44
frontend/public/json/test copy.json
Normal file
44
frontend/public/json/test copy.json
Normal 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"
|
||||
}
|
||||
]
|
||||
}
|
||||
Reference in New Issue
Block a user