Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set baseUrl for Octokit to make it work on GitHub Enterprise Server #144

Merged
merged 2 commits into from
Sep 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/setup.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
Loading