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

Make GITHUB_SERVER_URL configurable #488

Closed
killermoehre opened this issue Apr 30, 2021 · 1 comment
Closed

Make GITHUB_SERVER_URL configurable #488

killermoehre opened this issue Apr 30, 2021 · 1 comment

Comments

@killermoehre
Copy link

Hi,

I work on a GitHub Enterprise instance (https://github.internal.company) and want to check out something from https://github.com. My naive approach is

      - name: Checkout github.com/sapcc/fedIPA
        env:
          GITHUB_SERVER_URL: 'https://github.com'
        uses: actions/checkout@v2
        with:
          repository: sapcc/fedIPA
          submodules: true

but even though I overwrite the environment variable GITHUB_SERVER_URL (as used in https://github.com/actions/checkout/blob/main/src/url-helper.ts#L24) the action is still checking from the internal URL, trying to access https://github.internal.company/sapcc/fedIPA.
Mirroring the whole repository is not my goal as I just want to use the code to run some custom workflow.

Any advice?

@cory-miller
Copy link
Contributor

The code linked will prefer whatever is set with the action input:

https://github.com/actions/checkout/blob/a5ac7e51b41094c92402da3b24376905380afc29/action.yml#L98C3-L100

      - name: Checkout somewhere-else.com/sapcc/fedIPA
        uses: actions/checkout@v4
        with:
          repository: sapcc/fedIPA
          submodules: true
          github-server-url: https://somewhere-else.com

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