Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 8 additions & 7 deletions dist/index.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

9 changes: 7 additions & 2 deletions src/agent-deployer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ async function deployTarAgent(
const tarPath = resolvePath(inputs.path);

// Upload tar file
const uploadResult = await uploadTarFile(client, tarPath, inputs.objectTtlDays);
const uploadResult = await uploadTarFile(client, tarPath, inputs.objectTtlDays, inputs.isPublic);

// Create agent with object source
// Using client.api.post because SDK v1.0.0 types are missing 'version' field in AgentCreateParams
Expand Down Expand Up @@ -169,7 +169,12 @@ async function deployFileAgent(
const filePath = resolvePath(inputs.path);

// Upload single file
const uploadResult = await uploadSingleFile(client, filePath, inputs.objectTtlDays);
const uploadResult = await uploadSingleFile(
client,
filePath,
inputs.objectTtlDays,
inputs.isPublic
);

// Create agent with object source
// Using client.api.post because SDK v1.0.0 types are missing 'version' field in AgentCreateParams
Expand Down
14 changes: 9 additions & 5 deletions src/object-uploader.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@ export interface UploadResult {
export async function uploadTarFile(
client: RunloopSDK,
filePath: string,
ttlDays?: number
ttlDays?: number,
isPublic?: boolean
): Promise<UploadResult> {
core.info(`Uploading tar file: ${filePath}`);

Expand All @@ -33,7 +34,7 @@ export async function uploadTarFile(
throw new Error(`Unsupported tar file extension: ${fileName}`);
}

return uploadBuffer(client, fileBuffer, fileName, contentType, ttlDays);
return uploadBuffer(client, fileBuffer, fileName, contentType, ttlDays, isPublic);
}

/**
Expand All @@ -42,7 +43,8 @@ export async function uploadTarFile(
export async function uploadSingleFile(
client: RunloopSDK,
filePath: string,
ttlDays?: number
ttlDays?: number,
isPublic?: boolean
): Promise<UploadResult> {
core.info(`Uploading single file: ${filePath}`);

Expand All @@ -52,7 +54,7 @@ export async function uploadSingleFile(
// Determine content type based on file
const contentType = determineContentType(fileName, fileBuffer);

return uploadBuffer(client, fileBuffer, fileName, contentType, ttlDays);
return uploadBuffer(client, fileBuffer, fileName, contentType, ttlDays, isPublic);
}

/**
Expand All @@ -67,7 +69,8 @@ async function uploadBuffer(
buffer: Buffer,
objectName: string,
contentType: 'text' | 'binary' | 'gzip' | 'tar' | 'tgz',
ttlDays?: number
ttlDays?: number,
isPublic?: boolean
): Promise<UploadResult> {
core.info(`Starting object upload: ${objectName} (${buffer.length} bytes, type: ${contentType})`);

Expand All @@ -81,6 +84,7 @@ async function uploadBuffer(
uploaded_at: new Date().toISOString(),
},
...(ttlMs && { ttl_ms: ttlMs }),
...(isPublic && { is_public: true }),
};

core.info('Creating object...');
Expand Down
Loading