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

Action failing on GitHub Enterprise server #143

Closed
palloberg opened this issue Sep 27, 2024 · 0 comments · Fixed by #144
Closed

Action failing on GitHub Enterprise server #143

palloberg opened this issue Sep 27, 2024 · 0 comments · Fixed by #144

Comments

@palloberg
Copy link
Contributor

The action does not work when using GitHub Enterprise Server (GHES) as Octokit's getLatestRelease will use the local server API instead of reaching out to GutHub.com for the latest release of mozilla/sccache and thus fail.

For this to work on GHES the baseUrl must be hardcoded to https://api.github.com when calling getOctokit in setup.ts:

const octokit = getOctokit(token, {baseUrl: 'https://api.github.com'});

Users of the action must provide the token parameter when calling the action, i.e.:

      - uses: mozilla-actions/sccache-action@main
        with:
          token: ${{ secrets.MY_GITHUB_TOKEN }}

(preferably obtaining the token using https://github.com/actions/create-github-app-token).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant