Skip to content

Conversation

MahdiBaghbani
Copy link

Introduce a minimal, explicit vendor switch to prevent isGhes() from misclassifying non GitHub platforms (e.g., Forgejo/Gitea) as GHES, This PR adds a positive allowlist for GHES aliases and preserves current behavior for github.

On self-hosted non-GitHub servers, the current heuristic (GITHUB_SERVER_URL hostname) often evaluates to enterprise sending actions down GHES specific code paths and causing failures.
A tiny, explicit environment switch avoids this without changing default behavior on GitHub

for reference when this breaks other platforms please see:
actions/upload-artifact#676
https://code.forgejo.org/actions/upload-artifact
https://code.forgejo.org/forgejo/runner/src/branch/main/RELEASE-NOTES.md#3-4-0

Although this version is able to run actions/upload-artifact@v4 and actions/download-artifact@v4, these actions will fail because it does not run against GitHub.com. A fork of those two actions with this check disabled is made available at:
https://code.forgejo.org/forgejo/upload-artifact/src/tag/v4
https://code.forgejo.org/forgejo/download-artifact/src/tag/v4

go-gitea/gitea#31256

The workaround right now is:
https://gitea.com/actions/gitea-upload-artifact/commit/81f940d004763f986ba3582c007fd842dd5cb0d7
https://code.forgejo.org/forgejo/upload-artifact/commit/16871d9e8cfcf27ff31822cac382bbb5450f1e1e

@MahdiBaghbani MahdiBaghbani requested review from a team as code owners August 30, 2025 08:02
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 this pull request may close these issues.

1 participant