Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use http instead of https in image url #61

Merged
merged 1 commit into from
Oct 18, 2023
Merged
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
9 changes: 5 additions & 4 deletions src/manifest/manifest-create.action.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import fetch from "node-fetch";
import { DateTime } from "luxon";
import { findAsync } from "new-find-package-json";

const repoUrl = "https://registry.golem.network";
const repoUrl = "http://registry.golem.network";

type ImageInfo = {
url: string;
Expand All @@ -28,15 +28,16 @@ async function resolveTaskPackageUrl(tag: string): Promise<ImageInfo> {
const data = (await response.json()) as { https: string; http: string; sha3: string };

return {
url: data.https,
// url: data.https,
url: data.http,
hash: `sha3:${data.sha3}`,
};
}

async function getImageUrlFromTag(tag: string, providedHash?: string): Promise<ImageInfo> {
if (providedHash) {
return {
url: `${repoUrl}/v1/image/download?tag=${tag}&https=true`,
url: `${repoUrl}/v1/image/download?tag=${tag}', //&https=true`,
hash: providedHash,
};
}
Expand Down Expand Up @@ -81,7 +82,7 @@ async function getImageUrlFromUrl(url: string): Promise<ImageInfo> {

function getImageUrlFromHash(hash: string): ImageInfo {
return {
url: `${repoUrl}/v1/image/download?hash=${hash}&https=true`,
url: `${repoUrl}/v1/image/download?hash=${hash}`, //&https=true`,
hash: `sha3:${hash}`,
};
}
Expand Down