mirror of
https://github.com/Azure/setup-helm.git
synced 2025-07-16 19:00:35 +00:00
Adding auth header
This commit is contained in:
@ -5,6 +5,10 @@ inputs:
|
|||||||
description: 'Version of helm'
|
description: 'Version of helm'
|
||||||
required: true
|
required: true
|
||||||
default: 'latest'
|
default: 'latest'
|
||||||
|
token:
|
||||||
|
description: 'Github token'
|
||||||
|
default: ${{ github.token }}
|
||||||
|
required: true
|
||||||
outputs:
|
outputs:
|
||||||
helm-path:
|
helm-path:
|
||||||
description: 'Path to the cached helm binary'
|
description: 'Path to the cached helm binary'
|
||||||
|
@ -132,6 +132,7 @@ function getLatestHelmVersionFor(type) {
|
|||||||
return __awaiter(this, void 0, void 0, function* () {
|
return __awaiter(this, void 0, void 0, function* () {
|
||||||
console.log("Running graphql");
|
console.log("Running graphql");
|
||||||
console.log(type);
|
console.log(type);
|
||||||
|
const token = core.getInput('token', { 'required': true });
|
||||||
const versions = yield graphql_1.graphql(`
|
const versions = yield graphql_1.graphql(`
|
||||||
repository(name:"helm"
|
repository(name:"helm"
|
||||||
owner:"helm") {
|
owner:"helm") {
|
||||||
@ -142,7 +143,11 @@ function getLatestHelmVersionFor(type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`);
|
`, {
|
||||||
|
headers: {
|
||||||
|
authorization: token
|
||||||
|
}
|
||||||
|
});
|
||||||
console.log(versions);
|
console.log(versions);
|
||||||
return stableHelmVersion;
|
return stableHelmVersion;
|
||||||
});
|
});
|
||||||
|
@ -109,6 +109,7 @@ async function downloadHelm(version: string): Promise<string> {
|
|||||||
async function getLatestHelmVersionFor(type) {
|
async function getLatestHelmVersionFor(type) {
|
||||||
console.log("Running graphql")
|
console.log("Running graphql")
|
||||||
console.log(type)
|
console.log(type)
|
||||||
|
const token = core.getInput('token', { 'required': true });
|
||||||
const versions = await graphql(
|
const versions = await graphql(
|
||||||
`
|
`
|
||||||
repository(name:"helm"
|
repository(name:"helm"
|
||||||
@ -120,7 +121,12 @@ async function getLatestHelmVersionFor(type) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
`
|
`,
|
||||||
|
{
|
||||||
|
headers: {
|
||||||
|
authorization: token
|
||||||
|
}
|
||||||
|
}
|
||||||
);
|
);
|
||||||
console.log(versions);
|
console.log(versions);
|
||||||
return stableHelmVersion;
|
return stableHelmVersion;
|
||||||
|
Reference in New Issue
Block a user