k1LoW/octocov

"Error: env ACTIONS_RUNTIME_URL is only available from the context of an action" occurred on GHES

nowsprinting opened this issue · 3 comments

We using octocov on GHES and self hosted runner (macOS).

This error occurs is in the report upload.

Storing report...
Error: env ACTIONS_RUNTIME_URL is only available from the context of an action
Error: Process completed with exit code 1.

Can we give or substitute the ACTIONS_RUNTIME_URL in our environment?

workflow:

run: |
  gh release download --repo github.com/k1LoW/octocov --pattern "*darwin_amd64.zip"
  unzip -d octocov octocov*.zip
  ./octocov/octocov

Environment variable being set:

  • GITHUB_API_URL
  • GITHUB_TOKEN

.octocov:

report:
  if: is_default_branch
  datastores:
    - artifact://${GITHUB_REPOSITORY}
k1LoW commented

Can we give or substitute the ACTIONS_RUNTIME_URL in our environment?

ACTIONS_RUNTIME_URL is an environment variable that is required when uploading files to the GitHub Actions Artifact.

ref: https://github.com/search?q=repo%3Aactions%2Ftoolkit%20ACTIONS_RUNTIME_URL&type=code

For example, if the following Actions are not available, your environment may not support the GitHub Actions Artifact.

https://github.com/actions/upload-artifact

k1LoW commented

only available from the context of an action

I made a mistake 💦 . ACTIONS_RUNTIME_URL seems to be an environment variable that is only available when running as an action ( error message said... ).

Try https://github.com/k1LoW/octocov-action.

Thanks!

Try https://github.com/k1LoW/octocov-action.

Container actions is not run our masOS runner.
I try another workaround. Thank you!