mirror of
https://github.com/Azure/setup-helm.git
synced 2025-07-16 10:50:38 +00:00
Compare commits
6 Commits
addSupport
...
v3.5
Author | SHA1 | Date | |
---|---|---|---|
5119fcb908 | |||
f382f75448 | |||
b5b231a831 | |||
84b304dfb7 | |||
e4f3964f67 | |||
20d2b4f98d |
3
.gitignore
vendored
3
.gitignore
vendored
@ -11,8 +11,6 @@ pids
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
@ -64,4 +62,3 @@ node_modules
|
||||
coverage
|
||||
|
||||
# Transpiled JS
|
||||
lib/
|
||||
|
11879
lib/index.js
Normal file
11879
lib/index.js
Normal file
File diff suppressed because one or more lines are too long
14
src/run.ts
14
src/run.ts
@ -59,19 +59,23 @@ export async function getLatestHelmVersion(): Promise<string> {
|
||||
`
|
||||
{
|
||||
repository(name: "helm", owner: "helm") {
|
||||
releases(last: 100) {
|
||||
releases(first: 100, orderBy: {field: CREATED_AT, direction: DESC}) {
|
||||
nodes {
|
||||
tagName
|
||||
isLatest
|
||||
isDraft
|
||||
isPrerelease
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
`
|
||||
)
|
||||
const releases: string[] = repository.releases.nodes
|
||||
.reverse()
|
||||
.map((node: {tagName: string}) => node.tagName)
|
||||
const latestValidRelease = releases.find((tag) => isValidVersion(tag))
|
||||
const latestValidRelease: string = repository.releases.nodes.find(
|
||||
({tagName, isLatest, isDraft, isPreRelease}) =>
|
||||
isValidVersion(tagName) && isLatest && !isDraft && !isPreRelease
|
||||
)?.tagName
|
||||
|
||||
if (latestValidRelease) return latestValidRelease
|
||||
} catch (err) {
|
||||
core.warning(
|
||||
|
Reference in New Issue
Block a user