4
0
Fork 0
mirror of https://github.com/Azure/setup-helm.git synced 2025-11-07 13:06:56 +00:00

Changing reference

This commit is contained in:
Shivam Gupta 2021-03-17 13:16:46 +05:30
parent b899d99acf
commit 93b6cbba4e
2 changed files with 6 additions and 6 deletions

View file

@ -133,7 +133,7 @@ function getLatestHelmVersionFor(type) {
console.log("Running graphql");
console.log(type);
const token = core.getInput('token', { 'required': true });
const versions = yield graphql_1.graphql(`
const { repository } = yield graphql_1.graphql(`
{
repository(name:"helm", owner:"helm") {
releases(last: 100) {
@ -148,7 +148,7 @@ function getLatestHelmVersionFor(type) {
authorization: `token ${token}`
}
});
console.log(versions);
console.log(repository.releases.nodes);
return stableHelmVersion;
});
}
@ -175,7 +175,7 @@ function run() {
}
else if (version === LATEST_HELM3_VERSION) {
const v = yield getLatestHelmVersionFor(3);
version = 'v' + v;
version = v;
}
else if (!version.toLocaleLowerCase().startsWith('v')) {
version = 'v' + version;

View file

@ -110,7 +110,7 @@ async function getLatestHelmVersionFor(type) {
console.log("Running graphql")
console.log(type)
const token = core.getInput('token', { 'required': true });
const versions = await graphql(
const { repository } = await graphql(
`
{
repository(name:"helm", owner:"helm") {
@ -128,7 +128,7 @@ async function getLatestHelmVersionFor(type) {
}
}
);
console.log(versions);
console.log(repository.releases.nodes);
return stableHelmVersion;
}
@ -153,7 +153,7 @@ async function run() {
version = 'v' + v;
} else if (version === LATEST_HELM3_VERSION) {
const v = await getLatestHelmVersionFor(3);
version = 'v' + v;
version = v;
} else if (!version.toLocaleLowerCase().startsWith('v')) {
version = 'v' + version;
}