How to pass GitHub workflow variables to CustomPiOS scripts
Hi, as per the title I'd like define a variable in the GitHub worflow (and changing with something like strategy.matrix) and pass it down to the CustomPiOS scripts. While I can define the variable no problem, it seems I'm not able to read it properly from one bash script that is part of the filesystem I'm building. Is it possible? If so, how?
Thanks in advance.
In what phase are you trying to read it?
- Make sure to export it.
- Note that modules only export values starting with their name, eg the base module variables start with
${BASE_...}. Behavior coded here (related to how compgen works): https://github.com/guysoft/CustomPiOS/blob/devel/src/config#L105
@guysoft
- I'm setting up the workflow as follow:


then in the config file I'd like to use that variable to select only a subset of the modules available under src/modules

- I believe I'm not in that scenario since the variable is used before entering the modules, am I wrong?
I think the best way is to add what you want to config.local. You can see how it can be used in this part of a github action: https://github.com/guysoft/OctoPi/blob/devel/.github/workflows/build.yml#L41