mercedes-benz / sechub

SecHub provides a central API to test software with different security tools.
https://mercedes-benz.github.io/sechub/
MIT License
259 stars 58 forks source link

build index.js when running the GitHub action #3213

Open hamidonos opened 2 weeks ago

hamidonos commented 2 weeks ago

Situation

Currently we have to manually build and check-in the 'index.js' file of the GitHub action. The index.js file is a build artifact. Build artifacts should not be built manually as this can lead to inconsistencies. Furthermore it brings complexity & increases the repository size.

Wanted

The action.yaml currently expects the index.js like

runs:
  using: 'node16'
  main: './dist/index.js'

A better solution could be:

runs:
  using: 'node16'
  pre: 'npm install && npm run build'
  main: '[LOCAL_DIRECTORY]/dist/index.js'