Compare commits

...

3 Commits

Author SHA1 Message Date
Imran Ismail
b67a0e7e1b Package new build 2021-05-07 11:16:54 +08:00
Imran Ismail
60866b9f80 Add retry mechanism to octokit client 2021-01-20 03:02:45 +08:00
Imran Ismail
91ce0fb611 Add changelog following https://keepachangelog.com/ format (#31) 2020-10-13 23:16:16 +08:00
6 changed files with 1693 additions and 3 deletions

42
CHANGELOG.MD Normal file
View File

@@ -0,0 +1,42 @@
# Changelog
## v1.5.2
### Security
- Bump @actions/core to v1.2.6 to address deprecations raised in #30
## v1.5.1
### Changed
- Cache kustomize by requested version spec as key
## v1.5.0
### Changed
- Simplified asset look up
## v1.4.0
### Added
- Adds support for semver version ranges. Example: 3.x, 3.2.x
- Add a step in the workflow to test the action with default value
## v1.2.0
N/A
## v1.1.0
### Fixed
- Support for new download path for kustomize
## v1.0.0
### Changed
- Update metadata

1617
dist/index.js vendored

File diff suppressed because it is too large Load Diff

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

30
package-lock.json generated
View File

@@ -1434,6 +1434,11 @@
"universal-user-agent": "^6.0.0"
}
},
"@octokit/openapi-types": {
"version": "2.3.1",
"resolved": "https://registry.npmjs.org/@octokit/openapi-types/-/openapi-types-2.3.1.tgz",
"integrity": "sha512-KTzpRDT07euvbBYbPs121YDqq5DT94nBDFIyogsDhOnWL8yDCHev6myeiPTgS+VLmyUbdNCYu6L/gVj+Bd1q8Q=="
},
"@octokit/plugin-paginate-rest": {
"version": "2.4.0",
"resolved": "https://registry.npmjs.org/@octokit/plugin-paginate-rest/-/plugin-paginate-rest-2.4.0.tgz",
@@ -1456,6 +1461,26 @@
"deprecation": "^2.3.1"
}
},
"@octokit/plugin-retry": {
"version": "3.0.6",
"resolved": "https://registry.npmjs.org/@octokit/plugin-retry/-/plugin-retry-3.0.6.tgz",
"integrity": "sha512-2ht+F85yN5pVw6rhFfJhrpujI8ch2lQUEEsK/Pkx3elFgh9lW4sbZXisH+uDD15+kZU5NX4zQ4ycUDofGLmhXg==",
"requires": {
"@octokit/types": "^6.0.3",
"bottleneck": "^2.15.3"
},
"dependencies": {
"@octokit/types": {
"version": "6.3.2",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-6.3.2.tgz",
"integrity": "sha512-H6cbnDumWOQJneyNKCBWgnktRqTWcEm6gq2cIS3frtVgpCqB8zguromnjIWJW375btjnxwmbYBTEAEouruZ2Yw==",
"requires": {
"@octokit/openapi-types": "^2.3.1",
"@types/node": ">= 8"
}
}
}
},
"@octokit/request": {
"version": "5.4.9",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-5.4.9.tgz",
@@ -2401,6 +2426,11 @@
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.1.0.tgz",
"integrity": "sha512-IWIbu7pMqyw3EAJHzzHbWa85b6oud/yfKYg5rqB5hNE8CeMi3nX+2C2sj0HswfblST86hpVEOAb9x34NZd6P7A=="
},
"bottleneck": {
"version": "2.19.5",
"resolved": "https://registry.npmjs.org/bottleneck/-/bottleneck-2.19.5.tgz",
"integrity": "sha512-VHiNCbI1lKdl44tGrhNfU3lup0Tj/ZBMJB5/2ZbNXRCPuRCO7ed2mgcK4r17y+KB2EfuYuRaVlwNbAeaWGSpbw=="
},
"brace-expansion": {
"version": "1.1.11",
"resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",

View File

@@ -28,6 +28,7 @@
"@actions/core": "^1.2.6",
"@actions/io": "^1.0.2",
"@actions/tool-cache": "^1.3.3",
"@octokit/plugin-retry": "^3.0.6",
"@octokit/rest": "^18.0.6",
"semver": "^7.3.2"
},

View File

@@ -1,5 +1,6 @@
// Load tempDirectory before it gets wiped by tool-cache
import {Octokit} from '@octokit/rest'
import {retry} from '@octokit/plugin-retry'
import * as core from '@actions/core'
import * as cache from '@actions/tool-cache'
import * as path from 'path'
@@ -7,7 +8,8 @@ import * as semver from 'semver'
import * as fs from 'fs'
let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''
const octokit = new Octokit()
const RetriableOctokit = Octokit.plugin(retry)
const octokit = new RetriableOctokit()
const versionRegex = /\d+\.?\d*\.?\d*/
const toolName = 'kustomize'
const platform = process.platform