mirror of
https://github.com/golangci/golangci-lint-action.git
synced 2026-04-22 19:55:44 +00:00
feat: support linux arm64 public preview (#1144)
This commit is contained in:
parent
a0297a1378
commit
ec5d18412c
5 changed files with 30 additions and 3 deletions
|
|
@ -1,6 +1,7 @@
|
|||
import * as core from "@actions/core"
|
||||
import * as httpm from "@actions/http-client"
|
||||
import * as fs from "fs"
|
||||
import os from "os"
|
||||
import path from "path"
|
||||
|
||||
import { InstallMode } from "./install"
|
||||
|
|
@ -139,10 +140,14 @@ export async function findLintVersion(mode: InstallMode): Promise<VersionConfig>
|
|||
// if the patched version is passed, just use it
|
||||
if (reqLintVersion?.major !== null && reqLintVersion?.minor != null && reqLintVersion?.patch !== null) {
|
||||
return new Promise((resolve) => {
|
||||
let arch: string = "amd64"
|
||||
if (os.arch() === "arm64") {
|
||||
arch = "arm64"
|
||||
}
|
||||
const versionWithoutV = `${reqLintVersion.major}.${reqLintVersion.minor}.${reqLintVersion.patch}`
|
||||
resolve({
|
||||
TargetVersion: `v${versionWithoutV}`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-amd64.tar.gz`,
|
||||
AssetURL: `https://github.com/golangci/golangci-lint/releases/download/v${versionWithoutV}/golangci-lint-${versionWithoutV}-linux-${arch}.tar.gz`,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue