mirror of
https://github.com/imranismail/setup-kustomize.git
synced 2026-06-10 08:10:55 +00:00
Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6691bdeb1b | ||
|
|
86a0af5aa8 | ||
|
|
8757bab9d6 | ||
|
|
32e634d4e0 |
@@ -12,7 +12,7 @@ Every argument is optional.
|
|||||||
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
| ------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
|
||||||
| `github-token` | PAT (Personal Access Token) for authorizing the repository.<br>_Defaults to **\${{ github.token }}**_ |
|
| `github-token` | PAT (Personal Access Token) for authorizing the repository.<br>_Defaults to **\${{ github.token }}**_ |
|
||||||
| `kustomize-version` | Semver of kustomize to use. Examples: `10.x`, `10.15.1`, `>=10.15.0`<br>_Defaults to **\***_ |
|
| `kustomize-version` | Semver of kustomize to use. Examples: `10.x`, `10.15.1`, `>=10.15.0`<br>_Defaults to **\***_ |
|
||||||
| `fail-fast` | When github rate limits us, fail immediately or retry after the timeout that github wishes from us? Note: When setting this to `false` (which is the default!), a github workflow might accrue a long (and possibly expensive) runtime. |
|
| `fail-fast` | When github rate limits us, fail immediately or retry after the timeout that github wishes from us? <br>Note: When this is set to `false`, a github workflow might accrue a long (and possibly expensive) runtime.<br>_Defaults to **true**_ |
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
|||||||
@@ -8,6 +8,7 @@ const tempDir = path.join(__dirname, 'runner', 'temp')
|
|||||||
|
|
||||||
process.env['RUNNER_TOOL_CACHE'] = toolDir
|
process.env['RUNNER_TOOL_CACHE'] = toolDir
|
||||||
process.env['RUNNER_TEMP'] = tempDir
|
process.env['RUNNER_TEMP'] = tempDir
|
||||||
|
process.env['INPUT_FAIL-FAST'] = 'true'
|
||||||
|
|
||||||
import * as installer from '../src/installer'
|
import * as installer from '../src/installer'
|
||||||
|
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ inputs:
|
|||||||
fail-fast:
|
fail-fast:
|
||||||
description: 'Fail quickly on github rate limit. "false" or "true".'
|
description: 'Fail quickly on github rate limit. "false" or "true".'
|
||||||
required: false
|
required: false
|
||||||
default: 'false'
|
default: 'true'
|
||||||
runs:
|
runs:
|
||||||
using: 'node16'
|
using: 'node16'
|
||||||
main: 'dist/index.js'
|
main: 'dist/index.js'
|
||||||
|
|||||||
5
dist/index.js
vendored
5
dist/index.js
vendored
@@ -53,7 +53,7 @@ const fs = __importStar(__nccwpck_require__(7147));
|
|||||||
let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || '';
|
let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || '';
|
||||||
const EnhancedOctokit = utils_1.GitHub.plugin(plugin_throttling_1.throttling);
|
const EnhancedOctokit = utils_1.GitHub.plugin(plugin_throttling_1.throttling);
|
||||||
const githubToken = core.getInput('github-token');
|
const githubToken = core.getInput('github-token');
|
||||||
const failFast = core.getInput('fail-fast') === 'true' ? true : false;
|
const failFast = core.getBooleanInput('fail-fast');
|
||||||
let options = {
|
let options = {
|
||||||
throttle: {
|
throttle: {
|
||||||
onRateLimit: (retryAfter, opts) => {
|
onRateLimit: (retryAfter, opts) => {
|
||||||
@@ -120,7 +120,8 @@ function getMaxSatisfyingVersion(targetVersion) {
|
|||||||
try {
|
try {
|
||||||
for (var _b = __asyncValues(octokit.paginate.iterator(octokit.repos.listReleases, {
|
for (var _b = __asyncValues(octokit.paginate.iterator(octokit.repos.listReleases, {
|
||||||
owner: 'kubernetes-sigs',
|
owner: 'kubernetes-sigs',
|
||||||
repo: 'kustomize'
|
repo: 'kustomize',
|
||||||
|
per_page: 100
|
||||||
})), _c; _c = yield _b.next(), !_c.done;) {
|
})), _c; _c = yield _b.next(), !_c.done;) {
|
||||||
const response = _c.value;
|
const response = _c.value;
|
||||||
for (const release of response.data) {
|
for (const release of response.data) {
|
||||||
|
|||||||
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "setup-kustomize",
|
"name": "setup-kustomize",
|
||||||
"version": "1.7.1",
|
"version": "2.0.0",
|
||||||
"private": true,
|
"private": true,
|
||||||
"description": "Github action to setup-kustomize",
|
"description": "Github action to setup-kustomize",
|
||||||
"main": "lib/main.js",
|
"main": "lib/main.js",
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ let tempDirectory = process.env['RUNNER_TEMPDIRECTORY'] || ''
|
|||||||
const EnhancedOctokit = GitHub.plugin(throttling)
|
const EnhancedOctokit = GitHub.plugin(throttling)
|
||||||
|
|
||||||
const githubToken = core.getInput('github-token')
|
const githubToken = core.getInput('github-token')
|
||||||
const failFast = core.getInput('fail-fast') === 'true' ? true : false
|
const failFast = core.getBooleanInput('fail-fast')
|
||||||
|
|
||||||
let options: OctokitOptions = {
|
let options: OctokitOptions = {
|
||||||
throttle: {
|
throttle: {
|
||||||
@@ -91,7 +91,8 @@ async function getMaxSatisfyingVersion(
|
|||||||
octokit.repos.listReleases,
|
octokit.repos.listReleases,
|
||||||
{
|
{
|
||||||
owner: 'kubernetes-sigs',
|
owner: 'kubernetes-sigs',
|
||||||
repo: 'kustomize'
|
repo: 'kustomize',
|
||||||
|
per_page: 100
|
||||||
}
|
}
|
||||||
)) {
|
)) {
|
||||||
for (const release of response.data) {
|
for (const release of response.data) {
|
||||||
|
|||||||
Reference in New Issue
Block a user