Skip to content

Commit a5a1af8

Browse files
authored
disable github_token in GHES (#193)
1 parent 2d1b4f2 commit a5a1af8

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

README.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,9 @@ Default: `"latest"`
1717

1818
Used to authenticate requests to the GitHub API to obtain release data from the TFLint repository. Authenticating will increase the [API rate limit](https://developer.github.com/v3/#rate-limiting). Any valid token is supported. No permissions are required.
1919

20-
Default: `${{ github.token }}`
20+
Default: `${{ github.server_url == 'https://github.com' && github.token || '' }}`
2121

22-
To disable authentication, set this value to an empty string (`""`). GitHub Enterprise Server tokens will not be accepted by `github.com`. GHES users must either:
23-
24-
* Disable authentication
25-
* Provide an API token issued from `github.com`
26-
* [Apps](https://docs.github.com/en/apps/creating-github-apps/about-creating-github-apps/about-creating-github-apps) are the preferred way to authenticate on behalf of an organization
22+
GitHub Enterprise Server will make requests to github.com anonymously by default. To authenticate these requests, you must issue a token from github.com and pass it explicitly.
2723

2824
### `tflint_wrapper`
2925

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ inputs:
88
github_token:
99
description: GitHub token - used when getting the latest version of tflint
1010
required: false
11-
default: ${{ github.token }}
11+
default: ${{ github.server_url == 'https://github.com' && github.token || '' }}
1212
tflint_wrapper:
1313
description: Installs a wrapper script to wrap subsequent calls to `tflint` and expose `stdout`, `stderr`, and `exitcode` outputs
1414
default: 'false'

0 commit comments

Comments
 (0)