allure-framework / setup-allurectl

Set up your GitHub Actions workflow with a specific version of allurectl
https://qameta.io
Apache License 2.0
13 stars 3 forks source link

Update Action for GitHub enterprise #125

Open j-puri opened 1 year ago

j-puri commented 1 year ago

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:

  1. getVersion() relies on Oktokit defaulting the baseUrl. In Enterprise, this baseUrl appears to be defaulted to the enterprise URL rather than public GitHub.
  2. 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()
  3. The token needed by setUpTool() may therefore need to be different from the token used by getVersion().

Proposed changes:

  1. Hardcode the GitHub API URL to get releases by tag so it doesn't default to the Enterprise URL
  2. 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.
CLAassistant commented 1 year ago

CLA assistant check
All committers have signed the CLA.