Compare commits
19 Commits
releases/v
...
09d3bbfd8f
Author | SHA1 | Date | |
---|---|---|---|
09d3bbfd8f | |||
|
ac5ee1fca8 | ||
|
638a523e0c | ||
|
0a7ec47357 | ||
|
3419a8fa8f | ||
|
f77071b246 | ||
|
a4617735aa | ||
|
2dafda840c | ||
|
b70d33f56d | ||
|
3c00c0152f | ||
|
22d14750db | ||
|
a22741c887 | ||
|
f850d12cb3 | ||
|
17cd77473c | ||
|
484a64052d | ||
|
6e32762c2e | ||
|
17c21ab68c | ||
|
7f0153c54c | ||
|
a14110f6e6 |
4
.github/workflows/defaultLabels.yml
vendored
4
.github/workflows/defaultLabels.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
|
||||
# Steps represent a sequence of tasks that will be executed as part of the job
|
||||
steps:
|
||||
- uses: actions/stale@v3
|
||||
- uses: actions/stale@v6
|
||||
name: Setting issue as idle
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
@@ -24,7 +24,7 @@ jobs:
|
||||
operations-per-run: 100
|
||||
exempt-issue-labels: 'backlog'
|
||||
|
||||
- uses: actions/stale@v3
|
||||
- uses: actions/stale@v6
|
||||
name: Setting PR as idle
|
||||
with:
|
||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
2
.github/workflows/integration-tests.yml
vendored
2
.github/workflows/integration-tests.yml
vendored
@@ -15,7 +15,7 @@ jobs:
|
||||
PR_BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
- name: npm install and build
|
||||
id: action-npm-build
|
||||
run: |
|
||||
|
2
.github/workflows/prettify-code.yml
vendored
2
.github/workflows/prettify-code.yml
vendored
@@ -10,7 +10,7 @@ jobs:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: Checkout Repository
|
||||
uses: actions/checkout@v2
|
||||
uses: actions/checkout@v3
|
||||
|
||||
- name: Enforce Prettier
|
||||
uses: actionsx/prettier@v2
|
||||
|
2
.github/workflows/unit-tests.yml
vendored
2
.github/workflows/unit-tests.yml
vendored
@@ -13,7 +13,7 @@ jobs:
|
||||
build: # make sure build/ci works properly
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v3
|
||||
|
||||
- name: Run L0 tests.
|
||||
run: |
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@@ -11,6 +11,8 @@ pids
|
||||
*.seed
|
||||
*.pid.lock
|
||||
|
||||
# Directory for instrumented libs generated by jscoverage/JSCover
|
||||
lib-cov
|
||||
|
||||
# Coverage directory used by tools like istanbul
|
||||
coverage
|
||||
@@ -62,3 +64,4 @@ node_modules
|
||||
coverage
|
||||
|
||||
# Transpiled JS
|
||||
lib/
|
||||
|
@@ -14,7 +14,7 @@ Acceptable values are latest or any semantic version string like v3.5.0 Use this
|
||||
id: install
|
||||
```
|
||||
|
||||
> Note: When using latest version you might hit the GitHub GraphQL API hourly rate limit of 5,000. The action will then return the hardcoded default stable version (currently v3.9.0). If you rely on a certain version higher than the default, you should use that version instead of latest.
|
||||
> Note: When using latest version you might hit the GitHub GraphQL API hourly rate limit of 5,000. The action will then return the hardcoded default stable version (currently v3.11.1). If you rely on a certain version higher than the default, you should use that version instead of latest.
|
||||
|
||||
The cached helm binary path is prepended to the PATH environment variable as well as stored in the helm-path output variable.
|
||||
Refer to the action metadata file for details about all the inputs https://github.com/Azure/setup-helm/blob/master/action.yml
|
||||
|
11879
lib/index.js
11879
lib/index.js
File diff suppressed because one or more lines are too long
24
package-lock.json
generated
24
package-lock.json
generated
@@ -1966,9 +1966,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/decode-uri-component": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
||||
"integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||
"dev": true,
|
||||
"engines": {
|
||||
"node": ">=0.10"
|
||||
@@ -3753,9 +3753,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"node_modules/json5": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
|
||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true,
|
||||
"bin": {
|
||||
"json5": "lib/cli.js"
|
||||
@@ -7852,9 +7852,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"decode-uri-component": {
|
||||
"version": "0.2.0",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.0.tgz",
|
||||
"integrity": "sha512-hjf+xovcEn31w/EUYdTXQh/8smFL/dzYjohQGEIgjyNavaJfBY2p5F527Bo1VPATxv0VYTUC2bOcXvqFwk78Og==",
|
||||
"version": "0.2.2",
|
||||
"resolved": "https://registry.npmjs.org/decode-uri-component/-/decode-uri-component-0.2.2.tgz",
|
||||
"integrity": "sha512-FqUYQ+8o158GyGTrMFJms9qh3CqTKvAqgqsTnkLI8sKu0028orqBhxNMFkFen0zGyg6epACD32pjVk58ngIErQ==",
|
||||
"dev": true
|
||||
},
|
||||
"deep-is": {
|
||||
@@ -9233,9 +9233,9 @@
|
||||
"dev": true
|
||||
},
|
||||
"json5": {
|
||||
"version": "2.2.1",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.1.tgz",
|
||||
"integrity": "sha512-1hqLFMSrGHRHxav9q9gNjJ5EXznIxGVO09xQRrwplcS8qs28pZ8s8hupZAmqDwZUmVZ2Qb2jnyPOWcDH8m8dlA==",
|
||||
"version": "2.2.3",
|
||||
"resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz",
|
||||
"integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==",
|
||||
"dev": true
|
||||
},
|
||||
"kind-of": {
|
||||
|
@@ -23,19 +23,19 @@ describe('run.ts', () => {
|
||||
test('getHelmDownloadURL() - return the URL to download helm for Linux', () => {
|
||||
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
||||
jest.spyOn(os, 'arch').mockReturnValueOnce('unknown')
|
||||
const kubectlLinuxUrl = 'https://get.helm.sh/helm-v3.8.0-linux-amd64.zip'
|
||||
const helmLinuxUrl = 'https://get.helm.sh/helm-v3.8.0-linux-amd64.zip'
|
||||
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(kubectlLinuxUrl)
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(helmLinuxUrl)
|
||||
expect(os.type).toBeCalled()
|
||||
expect(os.arch).toBeCalled()
|
||||
|
||||
// arm64
|
||||
jest.spyOn(os, 'type').mockReturnValue('Linux')
|
||||
jest.spyOn(os, 'arch').mockReturnValueOnce('arm64')
|
||||
const kubectlLinuxArm64Url =
|
||||
const helmLinuxArm64Url =
|
||||
'https://get.helm.sh/helm-v3.8.0-linux-arm64.zip'
|
||||
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(kubectlLinuxArm64Url)
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(helmLinuxArm64Url)
|
||||
expect(os.type).toBeCalled()
|
||||
expect(os.arch).toBeCalled()
|
||||
})
|
||||
@@ -43,20 +43,19 @@ describe('run.ts', () => {
|
||||
test('getHelmDownloadURL() - return the URL to download helm for Darwin', () => {
|
||||
jest.spyOn(os, 'type').mockReturnValue('Darwin')
|
||||
jest.spyOn(os, 'arch').mockReturnValueOnce('unknown')
|
||||
const kubectlDarwinUrl =
|
||||
'https://get.helm.sh/helm-v3.8.0-darwin-amd64.zip'
|
||||
const helmDarwinUrl = 'https://get.helm.sh/helm-v3.8.0-darwin-amd64.zip'
|
||||
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(kubectlDarwinUrl)
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(helmDarwinUrl)
|
||||
expect(os.type).toBeCalled()
|
||||
expect(os.arch).toBeCalled()
|
||||
|
||||
// arm64
|
||||
jest.spyOn(os, 'type').mockReturnValue('Darwin')
|
||||
jest.spyOn(os, 'arch').mockReturnValueOnce('arm64')
|
||||
const kubectlDarwinArm64Url =
|
||||
const helmDarwinArm64Url =
|
||||
'https://get.helm.sh/helm-v3.8.0-darwin-arm64.zip'
|
||||
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(kubectlDarwinArm64Url)
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(helmDarwinArm64Url)
|
||||
expect(os.type).toBeCalled()
|
||||
expect(os.arch).toBeCalled()
|
||||
})
|
||||
@@ -68,14 +67,13 @@ describe('run.ts', () => {
|
||||
test('getHelmDownloadURL() - return the URL to download helm for Windows', () => {
|
||||
jest.spyOn(os, 'type').mockReturnValue('Windows_NT')
|
||||
|
||||
const kubectlWindowsUrl =
|
||||
'https://get.helm.sh/helm-v3.8.0-windows-amd64.zip'
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(kubectlWindowsUrl)
|
||||
const helmWindowsUrl = 'https://get.helm.sh/helm-v3.8.0-windows-amd64.zip'
|
||||
expect(run.getHelmDownloadURL('v3.8.0')).toBe(helmWindowsUrl)
|
||||
expect(os.type).toBeCalled()
|
||||
})
|
||||
|
||||
test('getLatestHelmVersion() - return the stable version of HELM since its not authenticated', async () => {
|
||||
expect(await run.getLatestHelmVersion()).toBe('v3.9.0')
|
||||
expect(await run.getLatestHelmVersion()).toBe('v3.11.1')
|
||||
})
|
||||
|
||||
test('walkSync() - return path to the all files matching fileToFind in dir', () => {
|
||||
|
@@ -11,10 +11,9 @@ import * as toolCache from '@actions/tool-cache'
|
||||
import * as core from '@actions/core'
|
||||
import {graphql} from '@octokit/graphql'
|
||||
import {createActionAuth} from '@octokit/auth-action'
|
||||
import {create} from 'domain'
|
||||
|
||||
const helmToolName = 'helm'
|
||||
const stableHelmVersion = 'v3.9.0'
|
||||
const stableHelmVersion = 'v3.11.1'
|
||||
|
||||
export async function run() {
|
||||
let version = core.getInput('version', {required: true})
|
||||
|
Reference in New Issue
Block a user