mirror of
https://github.com/Azure/setup-helm.git
synced 2025-11-08 13:36:56 +00:00
Update src/run.ts
Co-authored-by: Sander Verweij <sverweij@users.noreply.github.com>
This commit is contained in:
parent
25628192e0
commit
6909a53305
1 changed files with 6 additions and 4 deletions
10
src/run.ts
10
src/run.ts
|
|
@ -71,10 +71,12 @@ export async function getLatestHelmVersion(): Promise<string> {
|
||||||
}
|
}
|
||||||
`
|
`
|
||||||
)
|
)
|
||||||
const releases: string[] = repository.releases.nodes.map(
|
const latestValidRelease: string = repository.releases.nodes
|
||||||
(node: {tagName: string}) => node.tagName
|
.find(
|
||||||
)
|
({tagName, isLatest, isDraft, isPreRelease}) =>
|
||||||
const latestValidRelease = releases.find((tag) => isValidVersion(tag))
|
isValidVersion(tagName) && isLatest && !isDraft && !isPreRelease
|
||||||
|
)?.tagName
|
||||||
|
|
||||||
if (latestValidRelease) return latestValidRelease
|
if (latestValidRelease) return latestValidRelease
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
core.warning(
|
core.warning(
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue