Compare commits

...

23 Commits

Author SHA1 Message Date
suisrc 94124ff621 tag 4.2 2025-05-15 12:10:11 +08:00
suisrc 1fad258c52 add tool custom url 2025-05-15 10:51:01 +08:00
suisrc 74c9f46077 add tool custom url 2025-05-15 10:44:18 +08:00
suisrc 2d0efb3410 add tool custom url 2025-05-15 10:43:14 +08:00
suisrc d73190731a remove github action 2025-05-15 10:41:47 +08:00
suisrc 6563d5d80a add tool custom url
Run unit tests. / build (push) Has been cancelled
Run prettify / Prettier Check (push) Has been cancelled
Integration test for setup-kubectl / Validate release and master branch (push) Has been cancelled
CodeQL Advanced / Analyze (javascript-typescript) (push) Has been cancelled
2025-05-15 10:40:34 +08:00
dependabot[bot] a76651a0e0 Bump @types/node from 22.15.3 to 22.15.17 in the actions group (#157) 2025-05-13 15:08:34 -04:00
dependabot[bot] cf5fdd749b Bump github/codeql-action in /.github/workflows in the actions group (#156) 2025-05-06 15:05:05 -04:00
dependabot[bot] de1d5ec5de Bump @types/node from 22.14.1 to 22.15.3 in the actions group (#154) 2025-04-29 15:10:58 -04:00
dependabot[bot] e6e81bbc41 Bump the actions group in /.github/workflows with 2 updates (#155) 2025-04-29 15:10:37 -04:00
dependabot[bot] 30d747582d Bump the actions group with 2 updates (#152) 2025-04-15 15:07:41 -04:00
dependabot[bot] f4440b5470 Bump the actions group in /.github/workflows with 2 updates (#153) 2025-04-15 15:07:21 -04:00
dependabot[bot] 0fd96d6276 Bump the actions group with 3 updates (#150) 2025-04-08 15:06:25 -04:00
dependabot[bot] 4ef821e7ca Bump github/codeql-action in /.github/workflows in the actions group (#151) 2025-04-08 15:05:58 -04:00
dependabot[bot] 95e0936d6e Bump @types/node from 22.13.12 to 22.13.14 in the actions group (#148) 2025-04-01 15:07:10 -04:00
dependabot[bot] 87e53e3f71 Bump the actions group in /.github/workflows with 2 updates (#149)
Bumps the actions group in /.github/workflows with 2 updates: [github/codeql-action](https://github.com/github/codeql-action) and [actions/setup-python](https://github.com/actions/setup-python).


Updates `github/codeql-action` from 3.28.12 to 3.28.13
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/5f8171a638ada777af81d42b55959a643bb29017...1b549b9259bda1cb5ddde3b41741a82a2d15a841)

Updates `actions/setup-python` from 5.4.0 to 5.5.0
- [Release notes](https://github.com/actions/setup-python/releases)
- [Commits](https://github.com/actions/setup-python/compare/42375524e23c412d93fb67b49958b491fce71c38...8d9ed9ac5c53483de85588cdf95a591a75ab9f55)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-python
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-04-01 15:06:48 -04:00
dependabot[bot] 13bef3ca00 Bump the actions group across 1 directory with 2 updates (#147)
Bumps the actions group with 2 updates in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action) and [actions/setup-node](https://github.com/actions/setup-node).


Updates `github/codeql-action` from 3.28.11 to 3.28.12
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/6bb031afdd8eb862ea3fc1848194185e076637e5...5f8171a638ada777af81d42b55959a643bb29017)

Updates `actions/setup-node` from 4.2.0 to 4.3.0
- [Release notes](https://github.com/actions/setup-node/releases)
- [Commits](https://github.com/actions/setup-node/compare/1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a...cdca7365b2dadb8aad0a33bc7601856ffabcc48e)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: actions/setup-node
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-26 08:11:07 +13:00
dependabot[bot] 023f859e5d Bump the actions group with 2 updates (#146) 2025-03-26 08:10:51 +13:00
dependabot[bot] 6bd1f0daf1 Bump the actions group across 1 directory with 4 updates (#143)
Bumps the actions group with 4 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [prettier](https://github.com/prettier/prettier), [ts-jest](https://github.com/kulshekhar/ts-jest) and [typescript](https://github.com/microsoft/TypeScript).


Updates `@types/node` from 22.13.1 to 22.13.10
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.5.0 to 3.5.3
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.5.0...3.5.3)

Updates `ts-jest` from 29.2.5 to 29.2.6
- [Release notes](https://github.com/kulshekhar/ts-jest/releases)
- [Changelog](https://github.com/kulshekhar/ts-jest/blob/main/CHANGELOG.md)
- [Commits](https://github.com/kulshekhar/ts-jest/compare/v29.2.5...v29.2.6)

Updates `typescript` from 5.7.3 to 5.8.2
- [Release notes](https://github.com/microsoft/TypeScript/releases)
- [Changelog](https://github.com/microsoft/TypeScript/blob/main/azure-pipelines.release.yml)
- [Commits](https://github.com/microsoft/TypeScript/compare/v5.7.3...v5.8.2)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: ts-jest
  dependency-type: direct:development
  update-type: version-update:semver-patch
  dependency-group: actions
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 14:20:16 -04:00
dependabot[bot] 574933e749 Bump github/codeql-action (#144)
Bumps the actions group with 1 update in the /.github/workflows directory: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.9 to 3.28.11
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0...6bb031afdd8eb862ea3fc1848194185e076637e5)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-03-13 14:19:24 -04:00
dependabot[bot] 46ce001b45 Bump braces, jest and ts-jest (#103) 2025-02-19 20:50:54 -08:00
dependabot[bot] f7a3237edf Bump the actions group across 1 directory with 2 updates (#135)
Bumps the actions group with 2 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node) and [prettier](https://github.com/prettier/prettier).


Updates `@types/node` from 22.10.10 to 22.13.1
- [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases)
- [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node)

Updates `prettier` from 3.4.2 to 3.5.0
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.4.2...3.5.0)

---
updated-dependencies:
- dependency-name: "@types/node"
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:31 -08:00
dependabot[bot] 9c31f8cc61 Bump github/codeql-action in /.github/workflows in the actions group (#136)
Bumps the actions group in /.github/workflows with 1 update: [github/codeql-action](https://github.com/github/codeql-action).


Updates `github/codeql-action` from 3.28.6 to 3.28.9
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/17a820bf2e43b47be2c72b39cc905417bc1ab6d0...9e8d0789d4a0fa9ceb6b1738f7e269594bdd67f0)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: actions
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-12 12:11:05 -08:00
20 changed files with 6788 additions and 130 deletions
@@ -59,7 +59,7 @@ jobs:
# Initializes the CodeQL tools for scanning. # Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL - name: Initialize CodeQL
uses: github/codeql-action/init@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6 uses: github/codeql-action/init@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with: with:
languages: ${{ matrix.language }} languages: ${{ matrix.language }}
build-mode: ${{ matrix.build-mode }} build-mode: ${{ matrix.build-mode }}
@@ -86,6 +86,6 @@ jobs:
echo ' make release' echo ' make release'
exit 1 exit 1
- name: Perform CodeQL Analysis - name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@17a820bf2e43b47be2c72b39cc905417bc1ab6d0 # v3.28.6 uses: github/codeql-action/analyze@60168efe1c415ce0f5521ea06d5c2062adbeed1b # v3.28.17
with: with:
category: '/language:${{matrix.language}}' category: '/language:${{matrix.language}}'
@@ -29,7 +29,7 @@ jobs:
npm run build npm run build
fi fi
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38 # v5.4.0 - uses: actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5.6.0
name: Install Python name: Install Python
with: with:
python-version: '3.x' python-version: '3.x'
@@ -13,7 +13,7 @@ jobs:
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Setup Node.js - name: Setup Node.js
uses: actions/setup-node@1d0ff469b7ec7b3cb9d8673fde0c81c44821de2a # v4.2.0 uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4.4.0
with: with:
node-version: 'lts/*' node-version: 'lts/*'
cache: 'npm' cache: 'npm'
+2
View File
@@ -3,6 +3,8 @@
## ##
## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore
yarn.lock
# User-specific files # User-specific files
*.suo *.suo
*.user *.user
+6 -1
View File
@@ -5,9 +5,14 @@
Acceptable values are latest or any semantic version string like `v1.15.0`. Use this action in workflow to define which version of kubectl will be used. Acceptable values are latest or any semantic version string like `v1.15.0`. Use this action in workflow to define which version of kubectl will be used.
```yaml ```yaml
- uses: azure/setup-kubectl@v4 <<<<<<< HEAD
- uses: action/setup-kubectl-cn@v4.2
=======
- uses: azure/setup-kubectl@v4.1
>>>>>>> parent of 1fad258 (add tool custom url)
with: with:
version: '<version>' # default is latest stable version: '<version>' # default is latest stable
url: https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl # custom download url
id: install id: install
``` ```
+4
View File
@@ -5,6 +5,10 @@ inputs:
description: 'Version of kubectl' description: 'Version of kubectl'
required: true required: true
default: 'latest' default: 'latest'
url:
description: 'Url of kubectl'
required: false
default: ''
outputs: outputs:
kubectl-path: kubectl-path:
description: 'Path to the cached kubectl binary' description: 'Path to the cached kubectl binary'
+6284
View File
File diff suppressed because it is too large Load Diff
+474 -116
View File
File diff suppressed because it is too large Load Diff
+6 -5
View File
@@ -20,15 +20,16 @@
"dependencies": { "dependencies": {
"@actions/core": "^1.11.1", "@actions/core": "^1.11.1",
"@actions/exec": "^1.0.0", "@actions/exec": "^1.0.0",
"@actions/tool-cache": "^2.0.2" "@actions/tool-cache": "^2.0.2",
"ncc": "^0.3.6"
}, },
"devDependencies": { "devDependencies": {
"@types/jest": "^29.5.14", "@types/jest": "^29.5.14",
"@types/node": "^22.10.10", "@types/node": "^22.15.17",
"@vercel/ncc": "^0.38.3", "@vercel/ncc": "^0.38.3",
"jest": "^29.7.0", "jest": "^29.7.0",
"prettier": "3.4.2", "prettier": "3.5.3",
"ts-jest": "^29.2.5", "ts-jest": "^29.3.2",
"typescript": "5.7.3" "typescript": "5.8.3"
} }
} }
+4 -1
View File
@@ -9,7 +9,10 @@ export function getKubectlArch(): string {
return arch return arch
} }
export function getkubectlDownloadURL(version: string, arch: string): string { export function getkubectlDownloadURL(version: string, arch: string, url: string = ''): string {
if (url != '') {
return url.replace('${version}', version).replace('${arch}', arch)
}
switch (os.type()) { switch (os.type()) {
case 'Linux': case 'Linux':
return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl` return `https://dl.k8s.io/release/${version}/bin/linux/${arch}/kubectl`
+4 -3
View File
@@ -18,10 +18,11 @@ const stableVersionUrl =
export async function run() { export async function run() {
let version = core.getInput('version', {required: true}) let version = core.getInput('version', {required: true})
let toolurl = core.getInput('url', {required: false})
if (version.toLocaleLowerCase() === 'latest') { if (version.toLocaleLowerCase() === 'latest') {
version = await getStableKubectlVersion() version = await getStableKubectlVersion()
} }
const cachedPath = await downloadKubectl(version) const cachedPath = await downloadKubectl(version, toolurl)
core.addPath(path.dirname(cachedPath)) core.addPath(path.dirname(cachedPath))
@@ -48,14 +49,14 @@ export async function getStableKubectlVersion(): Promise<string> {
) )
} }
export async function downloadKubectl(version: string): Promise<string> { export async function downloadKubectl(version: string, toolurl: string = ''): Promise<string> {
let cachedToolpath = toolCache.find(kubectlToolName, version) let cachedToolpath = toolCache.find(kubectlToolName, version)
let kubectlDownloadPath = '' let kubectlDownloadPath = ''
const arch = getKubectlArch() const arch = getKubectlArch()
if (!cachedToolpath) { if (!cachedToolpath) {
try { try {
kubectlDownloadPath = await toolCache.downloadTool( kubectlDownloadPath = await toolCache.downloadTool(
getkubectlDownloadURL(version, arch) getkubectlDownloadURL(version, arch, toolurl)
) )
} catch (exception) { } catch (exception) {
if ( if (