Github-Release-Action
Github-Release-Action copied to clipboard
Creating release for self-hosted GitHub Enterprise fails
our environment is self-hosted GitHub Enterprise and self-hosted runners.
when i try to create a release, it fails with the following error:
none of the git remotes configured for this repository point to a known GitHub host. To tell gh about a new GitHub host, please use `gh auth login`
Error: Process completed with exit code 1.
here's the workflow code:
# create release if create_release is true.
- name: Create a Release
if: ${{ github.event.inputs.create_release }}
uses: elgohr/Github-Release-Action@v5
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
title: ${{ github.event.inputs.message }}
tag: ${{ env.TAG }}
i've tried adding a step prior to this that performs a gh auth, but i'm not certain that persists thru steps.
other action steps succeed, such as a git push command when the new tag is pushed up to our GitHub, using the ${{ secrets.GITHUB_TOKEN }}.
does this action work within the checked out repo code like other action steps do? could this be an issue with workdir?
or am i missing something else?
Did you try to set GH_HOST / GH_ENTERPRISE_TOKEN?
https://cli.github.com/manual/gh_help_environment
no that did it, GH_HOST + GH_ENTERPRISE_TOKEN. thanks. i will put in a PR to add these to documentation if that's ok.