kiegroup / act-js

A node.js wrapper for nektos/act to programmatically run your github actions locally
Apache License 2.0
54 stars 9 forks source link

Make artifactServer.port optional #59

Closed TWiStErRob closed 9 months ago

TWiStErRob commented 10 months ago

Feature request artifactServer.port should allow undefined value, because act has a default for --artifact-server-port, https://github.com/nektos/act/blob/v0.2.54/cmd/root.go#L93

Additional context I'm trying to overwrite artifactServer.path so the output is in a folder I can observe in the test. For this I have to do (testOutput returns an absolute path):

const result = await act.runEventAndJob("workflow_call", "unit-tests", {
      logFile: testOutput("act.log"),
      artifactServer: {
          path: testOutput("artifacts"),
          port: 34567 /* default: https://github.com/nektos/act/blob/v0.2.54/cmd/root.go#L93 */
      },
});

Notice that I do not need to set the port value to achieve what I want, the default would suffice.