PyO3/maturin-action

`working-directory` option accepts a full path for hostBuild, but joins with workspace on dockerBuild

Closed this issue · 1 comments

Great action, massively simplified my previous hacky maturin actions!

If you use the working-directory option, for the dockerBuild function (and also getManifestDir) the directory is as follows:

if (workdir.length > 0) {
    workdir = path.join(workspace, workdir)
  } else {
    workdir = workspace
  }

but for the hostbuild it is like this:

const workdir = core.getInput('working-directory') || process.cwd()

Always expecting it to be relative to the workspace is probably okay, but that should be documented and then probably the hostBuild should work similarly (or both should accept full paths).

I ran into this issue using ${{ github.workspace }}/ as the input for the working-directory. This was probably unnecessary, but it led to the Windows/macOS builds succeeding while the Linux build failed. Here is an example of a failed run.

I can make a PR to update the README (that it should be relative to the workspace) or to make sure both have the same behavior.

I can make a PR to update the README (that it should be relative to the workspace) or to make sure both have the same behavior.

Pull requests are welcome!