Support multiple flake directories
We like the idea behind #98 but unfortunately we switched this Action to use JS instead of Bash, which means that implementing that would be a non-trivial amount of work for @DavHau so I've decided to go ahead and implement it on my own (given that I know our internal libs well).
@davhau If you could give this a try in one of your repos, that would be great!
- uses: DeterminateSystems/update-flake-lock@multiple-flake-dirs-ts
Thanks for this. Will test it tomorrow
I've tested this out in an external repo: https://github.com/lucperkins/update-flake-lock-multiple-dirs
This run successfully created this PR (with sub-dirs subflake1 and subflake2).
There were two unsuccessful runs of the same workflow but that was solely related to improper permissions on the test repo. Changing the permissions resolved the issue.
@cole-h The root flake.lock is only updated once because I added it after the two sub-dirs. As for the PR body, we are a bit constrained here by Actions' inputs (in this case the pr-body input). Those can't be dynamic and the best we can do is update the default value.
Update: okay, I see now that we have some flexibility with the templating so I'll update the pr-body default to be more descriptive.
Yes, I know the root flake.lock is only updated once. However, if you look at your PR, the commit messages all say flake.lock: Update:
Whereas using nix flake update --commit-lock-file in a subdirectory will give you path/to/the/flake.lock: Update as the commit message.
This doesn't strike me as good UX, not being able to distinguish between which commit updated which flake.lock....