Docs: Suggest direnv-action for Github CI
What problem are you trying to solve?
https://www.jetify.com/devbox/docs/continuous_integration/github_action/ suggests to use jetify-com/devbox-install-action and then wrap all workflow commands with devbox run "...". The latter can be error prone - one might forget to wrap a newly added step.
What solution would you like?
Mention https://github.com/marketplace/actions/direnv-action on the docs.
Something like
Tip: direnv-action can be used for direnv setups. Then devbox environment will be applied automatically to all workflow steps.
(And maybe a small workflow example?)
Alternatives you've considered
Do nothing and close this issue :)
Adding direnv-action is just this:
- name: Load devbox via direnv
uses: HatsuneMiku3939/direnv-action@v1
Very interesting! A few questions:
- Have you used this on your Devbox setups in CI?
- Does this work well in monorepo type setups? Or does it only load 1 direnv config?
@Lagoja
- Have you used this on your Devbox setups in CI?
Yes. Currently it's in a PR https://github.com/AmazeeLabs/silverback-template/pull/338 but looks quite promising. Everything works as expected.
- Does this work well in monorepo type setups? Or does it only load 1 direnv config?
Hmm. I quickly checked the source. It looks like it only takes the root .envrc into account.
So, yeah, it can work only for simple setups.