action-gh-release
action-gh-release copied to clipboard
Support for Github Enterprise
Hello!
Just followed the guide and found that the workflow fails within Github Enterprise (due to firewall and attempt to invoke api.github.com).
Run softprops/action-gh-release@v1
⚠️ Unexpected error fetching GitHub release for tag refs/tags/v0.0.3: HttpError: request to https://api.github.com/repos/amex-eng/test/releases/tags/v0.0.3 failed, reason: getaddrinfo EAI_AGAIN api.github.com
Error: request to https://api.github.com/repos/amex-eng/boop-boop/releases/tags/v0.0.3 failed, reason: getaddrinfo EAI_AGAIN api.github.com
It looks like like this might be addressable through a minor dependency bump:
-
@actions/github
:^2.0.0
, =>^2.2.0
- https://github.com/actions/toolkit/blob/master/packages/github/RELEASES.md#220
Thanks for calling this out. I'm looking to do an upgrade of all dependencies soon
Did this ever get done? Looking to use this action.
I tried to use this on Enterprise and I'm getting
Error: Failed to upload release asset root-0.1.0-SNAPSHOT.zip. recieved status code 502 Error uploading to
/storage/releases/41590/files: 404
This is after it successfully creates a release. Could it be that Enterprise uses a different path to expose release files?
I'm also worried about the lack of protocol in the URL (hostname isn't prefixed with https).
At least the auto release mechanisms are working. You're right, its most likely a different path and actions most likely exposes that path in an environment variable.
From the docs:
Upload a release asset
This endpoint makes use of a Hypermedia relation to determine which URL to access. The endpoint you call to upload release assets is specific to your release. Use the upload_url returned in the response of the Create a release endpoint to upload a release asset.
Well, we're already using that it seems:
https://github.com/softprops/action-gh-release/blob/a80139913ad69754b738283897e8a1e3362b1a03/src/main.ts#L71-L77
Update: I think the template is expanded wrong - this is what I get "after" the uploadUrl
call:
https://<hostname>/api/uploads/repos/<org>/<repo>/releases/41591/assets{?name,label}
I'm having the same issue with GHE as well. Is this something we can fix? I can help test it or try to manage a PR if I can understand where the issue is.
I'm having the same issue with GHE as well. Is this something we can fix? I can help test it or try to manage a PR if I can understand where the issue is.
Same
Same with GHE, 502 followed by 404.
The action works in our GHES. However we need to always use a user token, even when all permissions are set in the workflow.
The default GITHUB_TOKEN will throw the error @ruckc mentioned when uploading files.