Add a sleep of 2s to let the step to register the newly catalog created from the gitea server
Signed-off-by: cmoulliard <cmoulliard@redhat.com>
This commit is contained in:
@@ -216,6 +216,8 @@ export function createPublishGiteaAction(options: {
|
||||
sourcePath,
|
||||
} = ctx.input;
|
||||
|
||||
const sleep = (ms: number | undefined) =>
|
||||
new Promise(r => setTimeout(r, ms));
|
||||
const { repo, host, owner } = parseRepoUrl(repoUrl, integrations);
|
||||
|
||||
const integrationConfig = integrations.gitea.byHost(host);
|
||||
@@ -269,6 +271,9 @@ export function createPublishGiteaAction(options: {
|
||||
gitAuthorInfo,
|
||||
});
|
||||
|
||||
// TODO: As mentioned by Ben lambert, we should poll an endpoint to see if it's ready yet instead of hard coding a sleep
|
||||
await sleep(2000);
|
||||
|
||||
const repoContentsUrl = `${integrationConfig.config.baseUrl}/${owner}/${repo}/+/refs/${defaultBranch}`;
|
||||
ctx.output('remoteUrl', remoteUrl);
|
||||
ctx.output('commitHash', commitResult?.commitHash);
|
||||
|
||||
Reference in New Issue
Block a user