Currently the action doesn't seem to be useable for Workflows running on GitHub Enterprise. This is because:
getVersion() relies on Oktokit defaulting the baseUrl. In Enterprise, this baseUrl appears to be defaulted to the enterprise URL rather than public GitHub.
The GitHub token provided by a Workflow may not be able to authenticate with the GitHub API on https://api.github.com/ if it limited by scope - this is needed by getVersion()
The token needed by setUpTool() may therefore need to be different from the token used by getVersion().
Proposed changes:
Hardcode the GitHub API URL to get releases by tag so it doesn't default to the Enterprise URL
Add an additional Action input to set a different token used by the setUpTool function to set Allure job metadata. This is defaulted to ${{ github.token }} to avoid regressions.
Update Action for Use on GitHub Enterprise
Currently the action doesn't seem to be useable for Workflows running on GitHub Enterprise. This is because:
getVersion()
relies on Oktokit defaulting the baseUrl. In Enterprise, this baseUrl appears to be defaulted to the enterprise URL rather than public GitHub.getVersion()
setUpTool()
may therefore need to be different from the token used bygetVersion()
.Proposed changes:
${{ github.token }}
to avoid regressions.