2
0
Fork 0
mirror of https://code.forgejo.org/docker/build-push-action.git synced 2025-09-10 18:00:57 +00:00

src: add ping before get stickydisk

This commit is contained in:
Claude 2025-05-16 13:41:46 -04:00
parent f0d8aee790
commit 1868624b97
3 changed files with 10 additions and 2 deletions

View file

@ -168,6 +168,14 @@ export async function getStickyDisk(options?: {signal?: AbortSignal}): Promise<{
const client = await reporter.createBlacksmithAgentClient();
core.info(`Created Blacksmith agent client`);
// Test connection using up endpoint
try {
await client.up({}, {signal: options?.signal});
core.info('Successfully connected to Blacksmith agent');
} catch (error) {
throw new Error(`grpc connection test failed: ${error.message}`);
}
const stickyDiskKey = process.env.GITHUB_REPO_NAME || '';
if (stickyDiskKey === '') {
throw new Error('GITHUB_REPO_NAME is not set');