Skip to content

Commit b953f36

Browse files
committed
use action config, don't require github token
fixes #11
1 parent 6993abb commit b953f36

File tree

8 files changed

+11730
-59775
lines changed

8 files changed

+11730
-59775
lines changed

.github/workflows/test.yml

+2-3
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,12 @@ jobs:
1515
npm install
1616
npm run prepare-deps
1717
npm run all
18-
git diff && git diff --cached
18+
git diff --exit-code
1919
test: # make sure the action works on a clean machine without building
2020
runs-on: ubuntu-latest
2121
steps:
2222
- uses: actions/checkout@v1
2323
- uses: ./
2424
with:
2525
version: v1.26
26-
args: --issues-exit-code=0 ./sample/...
27-
github-token: ${{ secrets.GITHUB_TOKEN }}
26+
args: --issues-exit-code=0 ./sample/...

README.md

+3-9
Original file line numberDiff line numberDiff line change
@@ -27,19 +27,13 @@ jobs:
2727
steps:
2828
- uses: actions/checkout@v2
2929
- name: golangci-lint
30-
uses: golangci/golangci-lint-action@v0.1.7
30+
uses: golangci/golangci-lint-action@v0.2.0
3131
with:
3232
# Required: the version of golangci-lint is required and must be specified without patch version: we always use the latest patch version.
3333
version: v1.26
3434

3535
# Optional: golangci-lint command line arguments.
3636
# args: ./the-only-dir-to-analyze/...
37-
38-
# Required: the token is used for fetching a list of releases of golangci-lint.
39-
# The secret `GITHUB_TOKEN` is automatically created by GitHub,
40-
# no need to create it manually.
41-
# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret
42-
github-token: ${{ secrets.GITHUB_TOKEN }}
4337
```
4438

4539
## Comments and Annotations
@@ -77,8 +71,8 @@ Inside our action we perform 3 steps:
7771

7872
1. Setup environment running in parallel:
7973
* restore [cache](https://github.com/actions/cache) of previous analyzes
80-
* list [releases of golangci-lint](https://github.com/golangci/golangci-lint/releases) and find the latest patch version
81-
for needed version (users of this action can specify only minor version). After that install [golangci-lint](https://github.com/golangci/golangci-lint) using [@actions/tool-cache](https://github.com/actions/toolkit/tree/master/packages/tool-cache)
74+
* fetch [action config](https://github.com/golangci/golangci-lint/blob/master/assets/github-action-config.json) and find the latest `golangci-lint` patch version
75+
for needed version (users of this action can specify only minor version of `golangci-lint`). After that install [golangci-lint](https://github.com/golangci/golangci-lint) using [@actions/tool-cache](https://github.com/actions/toolkit/tree/master/packages/tool-cache)
8276
* install the latest Go 1.x version using [@actions/setup-go](https://github.com/actions/setup-go)
8377
2. Run `golangci-lint` with specified by user `args`
8478
3. Save cache for later builds

0 commit comments

Comments
 (0)