Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support working-directory #75

Open
renatoathaydes opened this issue Apr 27, 2024 · 5 comments
Open

Support working-directory #75

renatoathaydes opened this issue Apr 27, 2024 · 5 comments
Labels
question Further information is requested

Comments

@renatoathaydes
Copy link

renatoathaydes commented Apr 27, 2024

GitHub Actions like runs support changing the working-directory.

This is important as many repositories contain more than one project.

I may be missing something, but I can't seem to make the working-dir declared in defaults to work with this action.

Maybe that's not possible, but it would be nice if at least this action took an optional working-directory as input so that if I have a crate under ./my-crate/ instead of at the root, I won't get this error:

error: could not find `Cargo.toml` in `/home/runner/work/my-repo/my-repo` or any parent directory
@taiki-e
Copy link
Owner

taiki-e commented Apr 27, 2024

error: could not find Cargo.toml in /home/runner/work/my-repo/my-repo or any parent directory

I believe you have to use manifest-path input option. (If you use this action outside of the cargo workspace, there is no way for the action side to automatically search for workspace based on the current directory.)

@taiki-e taiki-e added the question Further information is requested label Apr 27, 2024
@renatoathaydes
Copy link
Author

Thanks @taiki-e , I did end up using that and it worked.
Still, could be a nice feature to allow using the fairly common input working-directory (which just means you change the working-directory before running anything else)?
Anyway, feel free to close this ticket if you're not interested in adding that.

@taiki-e
Copy link
Owner

taiki-e commented Apr 27, 2024

I thought working-directory: could be used together with uses:, is that not so?

@renatoathaydes
Copy link
Author

My understanding is that it will only work if you make that part of your action's input.

@taiki-e
Copy link
Owner

taiki-e commented Apr 28, 2024

Ok, if the native working-directory option cannot be used, I would accept a PR to add a working-directory input option.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants