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

Automatically configure the GitHub server URL #32

Open
martincostello opened this issue Jan 27, 2024 · 3 comments
Open

Automatically configure the GitHub server URL #32

martincostello opened this issue Jan 27, 2024 · 3 comments
Labels
enhancement New feature or request keep do not mark as stale ready-for-work Issue is defined enough to begin implementation

Comments

@martincostello
Copy link
Contributor

martincostello commented Jan 27, 2024

GitHub Actions provides information about the URLs associated with the GitHub instance running the action, whether that is GitHub.com or GitHub Enterprise Server via the following properties of the github context:

  • api_url
  • graphql_url
  • server_url

Accordingly, when run as a GitHub Action (not as a standalone container), the action could self-configure itself for the current environment, only requiring the URL to be specified if it does not match the execution environment. This would make the action "just work™️" in GitHub Enterprise Server without having to explicitly configure the action.

For example:

---
name: 'Evergreen action'
author: 'github'
description: 'A GitHub Action to request dependabot enablement on eligible repositories in an organization.'
runs:
  using: 'docker'
  image: 'docker://ghcr.io/github/evergreen:v1'
+ env:
+   GH_ENTERPRISE_URL: ${{ github.server_url }}
branding:
  icon: 'file-plus'
  color: 'green'

In this scenario, renaming the variable to GH_URL would probably make the most sense, but it could be still be optional when using the container directly as it is today.

@zkoppert zkoppert added enhancement New feature or request ready-for-work Issue is defined enough to begin implementation labels Jan 29, 2024
@Abdallah-Afifi
Copy link

Is this still open?

Copy link

This issue is stale because it has been open 21 days with no activity. Remove stale label or comment or this will be closed in 14 days.

@github-actions github-actions bot added the Stale label Mar 13, 2024
@zkoppert
Copy link
Member

Yes this is still open @Abdallah-Afifi

@zkoppert zkoppert added keep do not mark as stale and removed Stale labels Mar 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request keep do not mark as stale ready-for-work Issue is defined enough to begin implementation
Projects
None yet
Development

No branches or pull requests

3 participants