use action config, don't require github token

fixes #11
This commit is contained in:
Denis Isaev
2020-05-09 16:27:58 +03:00
parent 6993abb7cd
commit 27e14e0f3f
9 changed files with 150 additions and 48195 deletions

View File

@ -4,7 +4,7 @@ import save from "cache/lib/save"
import * as crypto from "crypto"
import * as fs from "fs"
function checksumFile(hashName: string, path: string) {
function checksumFile(hashName: string, path: string): Promise<string> {
return new Promise((resolve, reject) => {
const hash = crypto.createHash(hashName)
const stream = fs.createReadStream(path)
@ -14,7 +14,7 @@ function checksumFile(hashName: string, path: string) {
})
}
const pathExists = async (path: string) => !!(await fs.promises.stat(path).catch(e => false))
const pathExists = async (path: string): Promise<boolean> => !!(await fs.promises.stat(path).catch(() => false))
const getLintCacheDir = (): string => `${process.env.HOME}/.cache/golangci-lint`