You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support cache dependencies for cases where package lock files are located in subfolders聽#275
We have a mixed-language monorepo with nothing in the base folder except some CI info. We need to be able to specify working-directory input like other scripts in order to use this fantastic action to build our node subfolders.
Hello @bbugh , I don't think that you need working-directory input in setup-node task. This task just installs specified Node.js version and do nothing with working directory.
If your package.json / project are located in the separate folder, I think you need to specify working-directory for next steps:
- uses: actions/setup-node@v2with:
node-version: '14'
- name: Install dependencies and build projectworking-directory: some-clientrun: | npm install npm run build npm run test
Hi again! 馃憢 On the caching PR, I had asked about caching working for mono repos, and you had replied saying that's not supported yet. I created this issue to request that support. 馃槈
Since GitHub actions has poor support for yaml and no reuse between steps, we have a lot of repetitive yarn tasks for caching and running. Having support built into this will be super helpful, and as we have a multi-language mono repo, we need to be able to run and cache them separately.
In particular, Yarn 2's cache folder will be different for each project, as the default is <project>/.yarn and in the case of zero-installs would be committed to source control. In that case, a working-directory would be used to successfully run yarn in the correct location with the correct cache folder.
Or a cache-root option, or something. I suggested working-directory because that's a standard configuration among most actions.
changed the title [-]Support working-directory input[/-][+]Support cache dependencies for cases where package lock files are located in subfolders[/+]on Jun 30, 2021
This feature request will be implemented soon. I have a small ADR under review #299 .
Proposed approach is a bit different from proposed in this issue - we would like allow specifying full path (directory path + filename) to lock file instead of working_directory (directory path only). We believe this approach will be a bit more generic and unblock more use-cases.
Reacted by Agostino Carandente, Eskild Diderichsen, mori yuta, Jens Willmer and Gregor Martynus
Reacted by Brian Bugh, Michalina Ciencia艂a and Ugo Pop茅e
Hello everyone, pull request with adding support of specifying lock files was merged. I'm closing the issue if you have any concerns, feel free to reopen it or ping me in the thread.
Activity
maxim-lobanov commentedon Jun 30, 2021
Hello @bbugh , I don't think that you need
working-directoryinput in setup-node task. This task just installs specified Node.js version and do nothing with working directory.If your
package.json/ project are located in the separate folder, I think you need to specifyworking-directoryfor next steps:bbugh commentedon Jun 30, 2021
Hi again! 馃憢 On the caching PR, I had asked about caching working for mono repos, and you had replied saying that's not supported yet. I created this issue to request that support. 馃槈
Since GitHub actions has poor support for yaml and no reuse between steps, we have a lot of repetitive yarn tasks for caching and running. Having support built into this will be super helpful, and as we have a multi-language mono repo, we need to be able to run and cache them separately.
In particular, Yarn 2's cache folder will be different for each project, as the default is
<project>/.yarnand in the case of zero-installs would be committed to source control. In that case, aworking-directorywould be used to successfully run yarn in the correct location with the correct cache folder.Or a
cache-rootoption, or something. I suggestedworking-directorybecause that's a standard configuration among most actions.[-]Support working-directory input[/-][+]Support cache dependencies for cases where package lock files are located in subfolders[/+]maxim-lobanov commentedon Jun 30, 2021
@bbugh caught it. I have renamed the issue title a bit to be more clear. Hope it works for you!
bbugh commentedon Jun 30, 2021
I'm always reminding people about XY problems and here I did one myself. Thanks!
maxim-lobanov commentedon Jul 15, 2021
Hello everyone!
This feature request will be implemented soon. I have a small ADR under review #299 .
Proposed approach is a bit different from proposed in this issue - we would like allow specifying full path (directory path + filename) to lock file instead of
working_directory(directory path only). We believe this approach will be a bit more generic and unblock more use-cases.dmitry-shibanov commentedon Aug 16, 2021
Hello everyone, pull request with adding support of specifying lock files was merged. I'm closing the issue if you have any concerns, feel free to reopen it or ping me in the thread.
Add `commit_sha` output (actions#275)