Compare commits

...

45 Commits

Author SHA1 Message Date
537aa1903e Expire cache periodically to avoid unbounded size (#466)
* Expire cache periodically to avoid unbounded size

The cache key includes a sequence number that rotates every 7 days
but because we are also using the base `golangci-lint.cache` as a
restore key, the new cache will always be seeded with the full
contents of the old cache.

In particular for the go module cache, this leads to an ever
increasing number of cached packages that never get pruned.

This commit updates it so we stop using `golangci-lint.cache` as
a restore key, which will force a build from an empty cache once
every 7 days.

* Rebuild files in dist/
2022-05-10 21:30:26 -07:00
f70e52dcc9 build(deps): bump @actions/core from 1.6.0 to 1.8.0 (#468)
* build(deps): bump @actions/core from 1.6.0 to 1.8.0

Bumps [@actions/core](https://github.com/actions/toolkit/tree/HEAD/packages/core) from 1.6.0 to 1.8.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/core/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/core)

---
updated-dependencies:
- dependency-name: "@actions/core"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update dist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
2022-05-10 21:21:05 -07:00
a304692ecb build(deps-dev): bump @typescript-eslint/eslint-plugin (#469) 2022-05-09 13:42:25 +02:00
eeca7c5026 build(deps-dev): bump eslint from 8.14.0 to 8.15.0 (#467) 2022-05-09 13:42:11 +02:00
dfbcd2aee1 build(deps): bump github/codeql-action from 1 to 2 (#459) 2022-05-03 08:17:26 +02:00
4421331437 build(deps-dev): bump @typescript-eslint/parser from 5.20.0 to 5.22.0 (#464)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.20.0 to 5.22.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.22.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 08:55:43 +03:00
5e6c1bb9e2 build(deps-dev): bump typescript from 4.6.3 to 4.6.4 (#461)
Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.3 to 4.6.4.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.3...v4.6.4)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 08:54:50 +03:00
44eba43bae build(deps-dev): bump @typescript-eslint/eslint-plugin (#460)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.20.0 to 5.21.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.21.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-05-03 08:47:28 +03:00
358a5e374f build(deps-dev): bump @typescript-eslint/eslint-plugin (#457)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.19.0 to 5.20.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.20.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-25 14:57:58 +03:00
b9c65a53a1 build(deps-dev): bump @typescript-eslint/parser from 5.19.0 to 5.20.0 (#455) 2022-04-25 09:48:00 +00:00
9620ff9416 build(deps-dev): bump eslint from 8.13.0 to 8.14.0 (#456) 2022-04-25 09:42:02 +00:00
f973c7630e build(deps): bump @actions/cache from 2.0.0 to 2.0.2 (#447)
* build(deps): bump @actions/cache from 2.0.0 to 2.0.2

Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 2.0.0 to 2.0.2.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* update dist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
2022-04-18 06:46:26 -07:00
ac76264da2 build(deps-dev): bump @typescript-eslint/parser from 5.18.0 to 5.19.0 (#454)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.18.0 to 5.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.19.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 06:34:32 -07:00
b6b896c763 build(deps-dev): bump @typescript-eslint/eslint-plugin (#453)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.18.0 to 5.19.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.19.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 16:26:53 +03:00
6d7c5c3914 build(deps-dev): bump @vercel/ncc from 0.33.3 to 0.33.4 (#452)
Bumps [@vercel/ncc](https://github.com/vercel/ncc) from 0.33.3 to 0.33.4.
- [Release notes](https://github.com/vercel/ncc/releases)
- [Commits](https://github.com/vercel/ncc/compare/0.33.3...0.33.4)

---
updated-dependencies:
- dependency-name: "@vercel/ncc"
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-18 16:26:15 +03:00
df2c66cf29 modify examples using setup-go (#451) 2022-04-15 06:38:11 -07:00
f9d718302d docs: update version to v3 (#450) 2022-04-13 15:25:12 -07:00
c3ef0c3702 build(deps): bump actions/setup-go from 2 to 3 (#443)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 2 to 3.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/setup-go
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-11 09:13:50 -04:00
e498e7736a build(deps-dev): bump eslint from 8.12.0 to 8.13.0 (#446) 2022-04-11 12:14:08 +02:00
e1674c1af9 build(deps-dev): bump @typescript-eslint/parser from 5.17.0 to 5.18.0 (#445) 2022-04-11 12:13:56 +02:00
f233bcb89a build(deps-dev): bump eslint-plugin-import from 2.25.4 to 2.26.0 (#444) 2022-04-11 12:13:41 +02:00
4b237a63e5 build(deps-dev): bump @typescript-eslint/eslint-plugin (#441)
Bumps [@typescript-eslint/eslint-plugin](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/eslint-plugin) from 5.16.0 to 5.18.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/eslint-plugin/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.18.0/packages/eslint-plugin)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/eslint-plugin"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-04 11:35:32 -07:00
af9f6d8b8e build(deps-dev): bump @typescript-eslint/parser from 5.16.0 to 5.17.0 (#438)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.16.0 to 5.17.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.17.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-04 11:25:01 -07:00
fb6358de51 build(deps): bump @actions/github from 5.0.0 to 5.0.1 (#437)
Bumps [@actions/github](https://github.com/actions/toolkit/tree/HEAD/packages/github) from 5.0.0 to 5.0.1.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/github/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/github)

---
updated-dependencies:
- dependency-name: "@actions/github"
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-04 11:24:34 -07:00
226c5fce6f build(deps-dev): bump prettier from 2.6.1 to 2.6.2 (#436)
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.1 to 2.6.2.
- [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/2.6.1...2.6.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-04-04 11:24:11 -07:00
009d23987c build(deps): bump @actions/cache from 1.0.10 to 2.0.0 (#432)
* build(deps): bump @actions/cache from 1.0.10 to 2.0.0

Bumps [@actions/cache](https://github.com/actions/toolkit/tree/HEAD/packages/cache) from 1.0.10 to 2.0.0.
- [Release notes](https://github.com/actions/toolkit/releases)
- [Changelog](https://github.com/actions/toolkit/blob/main/packages/cache/RELEASES.md)
- [Commits](https://github.com/actions/toolkit/commits/HEAD/packages/cache)

---
updated-dependencies:
- dependency-name: "@actions/cache"
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

* build dist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
2022-03-28 07:43:30 -07:00
6f887e018c build(deps-dev): bump typescript from 4.6.2 to 4.6.3 (#429)
* build(deps-dev): bump typescript from 4.6.2 to 4.6.3

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.6.2 to 4.6.3.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.6.2...v4.6.3)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

* build dist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
2022-03-28 07:34:08 -07:00
5af63786ee build(deps-dev): bump prettier from 2.6.0 to 2.6.1 (#428)
Bumps [prettier](https://github.com/prettier/prettier) from 2.6.0 to 2.6.1.
- [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/2.6.0...2.6.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-28 07:25:32 -07:00
128458b745 build(deps): bump minimist from 1.2.5 to 1.2.6 (#427)
Bumps [minimist](https://github.com/substack/minimist) from 1.2.5 to 1.2.6.
- [Release notes](https://github.com/substack/minimist/releases)
- [Commits](https://github.com/substack/minimist/compare/1.2.5...1.2.6)

---
updated-dependencies:
- dependency-name: minimist
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-26 19:19:03 +03:00
ca6bec4c75 build(deps): bump @actions/exec from 1.1.0 to 1.1.1 (#424) 2022-03-21 11:36:28 +01:00
042a8136fa build(deps-dev): bump @typescript-eslint/eslint-plugin (#425) 2022-03-21 10:58:28 +01:00
827c06dc36 build(deps): bump @actions/tool-cache from 1.7.1 to 1.7.2 (#426) 2022-03-21 10:58:15 +01:00
0105abc295 build(deps): bump @actions/cache from 1.0.9 to 1.0.10 (#423) 2022-03-21 10:57:35 +01:00
eb940f762b build(deps-dev): bump prettier from 2.5.1 to 2.6.0 (#422) 2022-03-21 10:57:18 +01:00
f9482e011a build(deps-dev): bump @typescript-eslint/parser from 5.14.0 to 5.15.0 (#421) 2022-03-21 10:45:34 +01:00
1e52a5d65c build(deps-dev): bump eslint from 8.10.0 to 8.11.0 (#418)
Bumps [eslint](https://github.com/eslint/eslint) from 8.10.0 to 8.11.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.10.0...v8.11.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-14 13:31:07 +03:00
2a74a2a5c4 build(deps-dev): bump typescript from 4.5.5 to 4.6.2 (#413)
* build(deps-dev): bump typescript from 4.5.5 to 4.6.2

Bumps [typescript](https://github.com/Microsoft/TypeScript) from 4.5.5 to 4.6.2.
- [Release notes](https://github.com/Microsoft/TypeScript/releases)
- [Commits](https://github.com/Microsoft/TypeScript/compare/v4.5.5...v4.6.2)

---
updated-dependencies:
- dependency-name: typescript
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update dist

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
2022-03-07 11:25:21 -08:00
6ab5ae85b2 build(deps-dev): bump eslint-config-prettier from 8.4.0 to 8.5.0 (#412)
Bumps [eslint-config-prettier](https://github.com/prettier/eslint-config-prettier) from 8.4.0 to 8.5.0.
- [Release notes](https://github.com/prettier/eslint-config-prettier/releases)
- [Changelog](https://github.com/prettier/eslint-config-prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/eslint-config-prettier/compare/v8.4.0...v8.5.0)

---
updated-dependencies:
- dependency-name: eslint-config-prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:08:45 -08:00
024aa36e22 build(deps-dev): bump @typescript-eslint/parser from 5.12.1 to 5.13.0 (#410)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 5.12.1 to 5.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v5.13.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:02:49 -08:00
f6cb2006aa build(deps): bump actions/checkout from 2 to 3 (#409)
Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 3.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v2...v3)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-03-07 11:01:50 -08:00
b517f99ae2 fix version in package-lock.json (#407) 2022-02-26 09:03:13 -08:00
9636c5bc97 Update version to 3.1.0 in package.json (#406) 2022-02-26 08:40:02 -08:00
03e4befc7a ci(dep): Add step to commit changes if PR has dependencies label (#108)
This commit is to perform below steps:

- If PR is having dependencies label, update files in dist as well
- If PR doesn't have dependencies label, fail the build if there
is dirty changes.

Closes #55

Signed-off-by: Tam Mach <sayboras@yahoo.com>
2022-02-26 08:26:42 -08:00
cdfc708aeb Allow to disable caching completely (#351)
* Add skip-cache parameter

* Update README

* Implement cache skipping

* Run prettier

* update descriptions

* re-build dist

Co-authored-by: Sergey Vilgelm <sergey@vilgelm.com>
2022-02-26 08:16:23 -08:00
7d5614c3eb build(deps-dev): bump eslint from 8.9.0 to 8.10.0 (#405)
Bumps [eslint](https://github.com/eslint/eslint) from 8.9.0 to 8.10.0.
- [Release notes](https://github.com/eslint/eslint/releases)
- [Changelog](https://github.com/eslint/eslint/blob/main/CHANGELOG.md)
- [Commits](https://github.com/eslint/eslint/compare/v8.9.0...v8.10.0)

---
updated-dependencies:
- dependency-name: eslint
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2022-02-26 07:53:08 -08:00
9 changed files with 5459 additions and 2469 deletions

View File

@ -16,7 +16,7 @@ jobs:
steps:
- name: Checkout repository
uses: actions/checkout@v2
uses: actions/checkout@v3
with:
# Must fetch at least the immediate parents so that if this is
# a pull request then we can checkout the head of the pull request.
@ -31,7 +31,7 @@ jobs:
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v1
uses: github/codeql-action/init@v2
# Override language selection by uncommenting this and choosing your languages
with:
language: 'javascript'
@ -41,4 +41,4 @@ jobs:
npm run all
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v1
uses: github/codeql-action/analyze@v2

View File

@ -10,13 +10,32 @@ jobs:
build: # make sure build/ci work properly
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- run: |
npm install
npm run all
# Update dist files if there is label dependencies
- name: Update dist files
if: github.event_name == 'pull_request' && contains(github.event.pull_request.labels.*.name, 'dependencies')
run: |
if [[ -z $(git status -s) ]]
then
echo "No change is required"
else
echo "Updating dist directory"
git config --local user.name "dependabot[bot]"
git config --local user.email "49699333+dependabot[bot]@users.noreply.github.com"
git add --update
git commit --message="Update dist files"
git push
fi
# Fail the build if there is dirty change
- run: git diff --exit-code
test: # make sure the action works on a clean machine without building
needs: [ build ]
strategy:
matrix:
os:
@ -33,8 +52,8 @@ jobs:
contents: read
pull-requests: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: ./
with:
version: ${{ matrix.version }}
@ -42,6 +61,7 @@ jobs:
only-new-issues: true
test-go-mod-version:
needs: [ build ]
strategy:
matrix:
os:
@ -52,8 +72,8 @@ jobs:
permissions:
contents: read
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
- uses: actions/checkout@v3
- uses: actions/setup-go@v3
- uses: ./
with:
working-directory: sample-go-mod

View File

@ -9,7 +9,7 @@ The action runs [golangci-lint](https://github.com/golangci/golangci-lint) and r
## Compatibility
* `v3.0.0+` requires explicit setup-go installation step prior to using this action: `uses: actions/setup-go@v2`.
* `v3.0.0+` requires explicit setup-go installation step prior to using this action: `uses: actions/setup-go@v3`.
The `skip-go-installation` option has been removed.
* `v2.0.0+` works with `golangci-lint` version >= `v1.28.3`
* `v1.2.2` is deprecated due to we forgot to change the minimum version of `golangci-lint` to `v1.28.3` ([issue](https://github.com/golangci/golangci-lint-action/issues/39))
@ -38,10 +38,12 @@ jobs:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: 1.17
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
# Optional: version of golangci-lint to use in form of v1.2 or v1.2.3 or `latest` to use the latest version
version: v1.29
@ -55,6 +57,10 @@ jobs:
# Optional: show only new issues if it's a pull request. The default value is `false`.
# only-new-issues: true
# Optional: if set to true then the all caching functionality will be complete disabled,
# takes precedence over all other caching options.
# skip-cache: true
# Optional: if set to true then the action don't cache or restore ~/go/pkg.
# skip-pkg-cache: true
@ -87,15 +93,17 @@ jobs:
golangci:
strategy:
matrix:
go-version: [1.15.x]
go: [1.17]
os: [macos-latest, windows-latest]
name: lint
runs-on: ${{ matrix.os }}
steps:
- uses: actions/setup-go@v2
- uses: actions/checkout@v2
- uses: actions/setup-go@v3
with:
go-version: ${{ matrix.go }}
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v2
uses: golangci/golangci-lint-action@v3
with:
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
version: v1.29

View File

@ -20,6 +20,12 @@ inputs:
description: "if set to true and the action runs on a pull request - the action outputs only newly found issues"
default: false
required: true
skip-cache:
description: |
if set to true then the all caching functionality will be complete disabled,
takes precedence over all other caching options.
default: false
required: true
skip-pkg-cache:
description: "if set to true then the action doesn't cache or restore ~/go/pkg."
default: false

3340
dist/post_run/index.js vendored

File diff suppressed because one or more lines are too long

3340
dist/run/index.js vendored

File diff suppressed because one or more lines are too long

1143
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
{
"name": "golanci-lint-action",
"version": "2.0.0",
"version": "3.1.0",
"private": true,
"description": "golangci-lint github action",
"main": "dist/main.js",
@ -24,25 +24,25 @@
"author": "golangci",
"license": "MIT",
"dependencies": {
"@actions/cache": "^1.0.9",
"@actions/core": "^1.6.0",
"@actions/exec": "^1.1.0",
"@actions/github": "^5.0.0",
"@actions/tool-cache": "^1.7.1",
"@actions/cache": "^2.0.2",
"@actions/core": "^1.8.0",
"@actions/exec": "^1.1.1",
"@actions/github": "^5.0.1",
"@actions/tool-cache": "^1.7.2",
"@types/semver": "^7.3.9",
"@types/tmp": "^0.2.3",
"tmp": "^0.2.1"
},
"devDependencies": {
"@typescript-eslint/eslint-plugin": "^5.12.1",
"@typescript-eslint/parser": "^5.12.1",
"@vercel/ncc": "^0.33.3",
"eslint": "^8.9.0",
"eslint-config-prettier": "^8.4.0",
"eslint-plugin-import": "^2.25.4",
"@typescript-eslint/eslint-plugin": "^5.22.0",
"@typescript-eslint/parser": "^5.22.0",
"@vercel/ncc": "^0.33.4",
"eslint": "^8.15.0",
"eslint-config-prettier": "^8.5.0",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-prettier": "^4.0.0",
"eslint-plugin-simple-import-sort": "^7.0.0",
"prettier": "^2.5.1",
"typescript": "^4.5.5"
"prettier": "^2.6.2",
"typescript": "^4.6.4"
}
}

View File

@ -52,12 +52,9 @@ const getIntervalKey = (invalidationIntervalDays: number): string => {
async function buildCacheKeys(): Promise<string[]> {
const keys = []
let cacheKey = `golangci-lint.cache-`
keys.push(cacheKey)
// Periodically invalidate a cache because a new code being added.
// TODO: configure it via inputs.
cacheKey += `${getIntervalKey(7)}-`
let cacheKey = `golangci-lint.cache-${getIntervalKey(7)}-`
keys.push(cacheKey)
if (await pathExists(`go.mod`)) {
@ -72,6 +69,8 @@ async function buildCacheKeys(): Promise<string[]> {
}
export async function restoreCache(): Promise<void> {
if (core.getInput(`skip-cache`, { required: true }).trim() == "true") return
if (!utils.isValidEvent()) {
utils.logWarning(
`Event Validation Error: The event type ${process.env[Events.Key]} is not supported because it's not tied to a branch or tag ref.`
@ -112,6 +111,8 @@ export async function restoreCache(): Promise<void> {
}
export async function saveCache(): Promise<void> {
if (core.getInput(`skip-cache`, { required: true }).trim() == "true") return
// Validate inputs, this can cause task failure
if (!utils.isValidEvent()) {
utils.logWarning(