Adding auth header

This commit is contained in:
Shivam Gupta
2021-03-17 12:24:04 +05:30
parent e7eef55398
commit dd82509766
3 changed files with 17 additions and 2 deletions

View File

@ -132,6 +132,7 @@ function getLatestHelmVersionFor(type) {
return __awaiter(this, void 0, void 0, function* () {
console.log("Running graphql");
console.log(type);
const token = core.getInput('token', { 'required': true });
const versions = yield graphql_1.graphql(`
repository(name:"helm"
owner:"helm") {
@ -142,7 +143,11 @@ function getLatestHelmVersionFor(type) {
}
}
}
`);
`, {
headers: {
authorization: token
}
});
console.log(versions);
return stableHelmVersion;
});