mirror of
https://github.com/docker/build-push-action.git
synced 2025-08-11 02:52:11 +00:00
Merge pull request #114 from useblacksmith/add-up-ping
src: add ping before get stickydisk
This commit is contained in:
commit
198ccc9626
2
dist/index.js
generated
vendored
2
dist/index.js
generated
vendored
File diff suppressed because one or more lines are too long
2
dist/index.js.map
generated
vendored
2
dist/index.js.map
generated
vendored
File diff suppressed because one or more lines are too long
@ -168,6 +168,14 @@ export async function getStickyDisk(options?: {signal?: AbortSignal}): Promise<{
|
|||||||
const client = await reporter.createBlacksmithAgentClient();
|
const client = await reporter.createBlacksmithAgentClient();
|
||||||
core.info(`Created Blacksmith agent client`);
|
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 || '';
|
const stickyDiskKey = process.env.GITHUB_REPO_NAME || '';
|
||||||
if (stickyDiskKey === '') {
|
if (stickyDiskKey === '') {
|
||||||
throw new Error('GITHUB_REPO_NAME is not set');
|
throw new Error('GITHUB_REPO_NAME is not set');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user