tortellini-tools / action

GH action to check dependency licence issues using ort
https://github.com/marketplace/actions/tortellini-action
Apache License 2.0
3 stars 6 forks source link

Local run command no longer works #123

Closed sverhoeven closed 3 years ago

sverhoeven commented 3 years ago

https://github.com/tortellini-tools/action/blob/main/README.dev.md#on-the-current-repository describes how to run check locally however this gives error:

ode dist/index.js
::error::no such file or directory: 

Probably because the default value from action.yml is not used. The core.getInput(name) only reads INPUT_NAME env variable.

To be able to run locally we could

  1. Add INPUT_<config>=<default config url> env vars to README.dev.md
  2. Replace core.getInput(name) with core.getInput(name) || '<default config url>'
  3. Use another method to get defaults from action.yml when running locally
  4. Run workflow locally using act

What is the best solution?

sverhoeven commented 3 years ago

Option 1 could look like

INPUT_RULES=https://github.com/NLeSC/tortellini-on-rsd/raw/main/config/rules.kts \
INPUT_CLASSIFICATIONS=https://github.com/NLeSC/tortellini-on-rsd/raw/main/config/license-classifications.yml \
node dist/index.js
sverhoeven commented 3 years ago

Fixed in #129