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

doesn't seem to work with Github Enterprise? #139

Closed
matthewfischer opened this issue Nov 28, 2023 · 4 comments
Closed

doesn't seem to work with Github Enterprise? #139

matthewfischer opened this issue Nov 28, 2023 · 4 comments

Comments

@matthewfischer
Copy link

matthewfischer commented Nov 28, 2023

Using Github Enterprise (GHE) the URLs for the repos and APIs are different. I have set GITHUB_SERVER_URL, GITHUB_GRAPHQL_URL and GITHUB_API_URL without success. It seems to be ignoring the GRAPHQL URL variable entirely, or I am setting it wrong.

Error: request to https://api.github.com/graphql failed.

on:
  workflow_dispatch:

jobs:
  rebase:
    strategy:
      matrix:
        repo: [foo/bar-repo]
    runs-on: [ build_system ]
    steps:
      - uses: peter-evans/rebase@v2
        env:
          GITHUB_SERVER_URL: https://github.xyz.com
          GITHUB_API_URL: https://github.xyz.com/api/v3
          GITHUB_GRAPHQL_URL: https://github.xyz.com/api/graphql
        with:
          token: ${{ secrets.PAT_TOKEN }}
          repository: ${{ matrix.repo }}

I am not quite sure where it's failing (is there a debug mode?) specifically.

@peter-evans
Copy link
Owner

Hi @matthewfischer

I've released a new version of the action (v2.1.0 / v2), which hopefully works on GHE. It's difficult for me to test so please let me know if you run into any further issues.

By the way, I'm not sure if you need to set the environment variables explicitly in the workflow like that. Try without first, because I have a feeling those are set automatically on the runner.

@matthewfischer
Copy link
Author

It worked! Thanks! With this change can I drop the environment variables?

@peter-evans
Copy link
Owner

It worked! Thanks! With this change can I drop the environment variables?

As I mentioned, I'm not sure if you need them because it's my understanding that they should already be set on the runner for GHE. But I'm not an expert on GHE, so could be wrong. Please try removing them and see if it still works.

@matthewfischer
Copy link
Author

Done and it still works. Thanks again!

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

No branches or pull requests

2 participants