Skip to content

Commit 09e4448

Browse files
committed
docs: recommend using GITHUB_TOKEN
Fixes: #9
1 parent 1ad27ad commit 09e4448

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

.github/workflows/test.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,4 @@ jobs:
2424
with:
2525
version: v1.26
2626
args: --issues-exit-code=0 ./sample/...
27-
github-token: ${{ secrets.GOLANGCI_LINT_GITHUB_TOKEN }}
27+
github-token: ${{ secrets.GITHUB_TOKEN }}

README.md

+7-8
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,7 @@ The action runs [golangci-lint](https://github.com/golangci/golangci-lint) and r
99

1010
## How to use
1111

12-
1. Create a [GitHub token](https://github.com/settings/tokens/new) with scope `repo.public_repo`.
13-
2. Add it to a [repository secrets](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets): repository -> `Settings` -> `Secrets`.
14-
3. Add `.github/workflows/golangci-lint.yml` with the following contents:
12+
Add `.github/workflows/golangci-lint.yml` with the following contents:
1513

1614
```yaml
1715
name: golangci-lint
@@ -37,8 +35,10 @@ jobs:
3735
# Optional: golangci-lint command line arguments.
3836
# args: ./the-only-dir-to-analyze/...
3937

40-
# Required: GitHub token with scope `repo.public_repo`. Used for fetching a list of releases of golangci-lint.
41-
github-token: ${{ secrets.GOLANGCI_LINT_GITHUB_TOKEN }}
38+
# It's automatically created by GitHub, no need to create it manually.
39+
# https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token#about-the-github_token-secret
40+
# The token is used for fetching a list of releases of golangci-lint.
41+
github-token: ${{ secrets.GITHUB_TOKEN }}
4242
```
4343
4444
## Comments and Annotations
@@ -95,6 +95,5 @@ This scheme is basic and needs improvements. Pull requests and ideas are welcome
9595

9696
1. Install [act](https://github.com/nektos/act#installation)
9797
2. Make a symlink for `act` to work properly: `ln -s . golangci-lint-action`
98-
3. Get a [GitHub token](https://github.com/settings/tokens/new) with the scope `repo.public_repo`. Export it by `export GITHUB_TOKEN=YOUR_TOKEN`.
99-
4. Prepare deps once: `npm run prepare-deps`
100-
5. Run `npm run local` after any change to test it
98+
3. Prepare deps once: `npm run prepare-deps`
99+
4. Run `npm run local` after any change to test it

0 commit comments

Comments
 (0)