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

Support Forgejo (& GHES?) #236

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

cswimr
Copy link

@cswimr cswimr commented Mar 19, 2025

Currently, this action uses regex to check specifically for github.com. This means that part of this action's functionality cannot be used in its current state on other platforms, or in GitHub's own enterprise selfhosting version. This PR adds support for non-GitHub providers, although I've only specifically tested it with Forgejo.

@cswimr
Copy link
Author

cswimr commented Mar 19, 2025

I'm not able to build this branch (or master for that matter) on my local development machine. Full disclosure, these changes were made by me a few months ago, I just hadn't contributed them upstream yet and wanted to clean them up a bit before doing so. I know the changes work, but I can't test this PR easily because I'm unable to build the dist files the action actually uses. Here's my old, known-good changes to compare against, as well as an example job run.

@cswimr
Copy link
Author

cswimr commented Mar 19, 2025

Alternatively to setting the default to github.com, it may be beneficial to set the default to the contents of the GITHUB_SERVER_URL environment variable. Judging by the name, I'm assuming this is a thing in GitHub Actions, and it certainly exists in Forgejo Actions, where it returns the instance URL of the Forgejo instance that the action is running against. This creates an edge case where the action could potentially break if the Forgejo instance's SSH_DOMAIN is set to something other than the ROOT_URL, but I think that's probably a relatively rare issue and it's easy to work around.

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