mirror of
https://github.com/Mozilla-Actions/sccache-action.git
synced 2026-04-08 17:42:13 +08:00
Merge pull request #144 from palloberg/set-baseurl
Set baseUrl for Octokit to make it work on GitHub Enterprise Server
This commit is contained in:
13
README.md
13
README.md
@@ -86,6 +86,19 @@ With configure, call it with:
|
||||
./configure CC="sccache clang" CXX="sccache clang"
|
||||
```
|
||||
|
||||
## Using on GitHub Enterprise Server (GHES)
|
||||
|
||||
When using the action on GitHub Enterprise Server installations a valid GitHub.com token must be provided.
|
||||
|
||||
```
|
||||
- name: Run sccache-cache
|
||||
uses: mozilla-actions/sccache-action@v0.0.5
|
||||
with:
|
||||
token: ${{ secrets.MY_GITHUB_TOKEN }}
|
||||
```
|
||||
|
||||
Note that using https://github.com/actions/create-github-app-token is a better option than storing a fixed token in the repo secrets.
|
||||
|
||||
## Prepare a new release
|
||||
|
||||
1. Update the example in README.md
|
||||
|
||||
@@ -31,7 +31,7 @@ async function setup() {
|
||||
if (version.length === 0) {
|
||||
// If no version is specified, the latest version is used by default.
|
||||
const token = core.getInput('token', {required: true});
|
||||
const octokit = getOctokit(token);
|
||||
const octokit = getOctokit(token, {baseUrl: 'https://api.github.com'});
|
||||
const release = await octokit.rest.repos.getLatestRelease({
|
||||
owner: 'mozilla',
|
||||
repo: 'sccache'
|
||||
|
||||
Reference in New Issue
Block a user