theforeman / actions

Shared GitHub workflows for use in the Foreman project
3 stars 6 forks source link

Support setting arbitrary environment variables in foreman_plugin #44

Closed laugmanuel closed 6 months ago

laugmanuel commented 7 months ago

We should support setting arbitrary environment variables by passing them as an input to the job. This would allow the caller/user to customize the test behaviour by reading the variables back in code.

See discussion in https://github.com/dm-drogeriemarkt/foreman_wreckingball/pull/113

laugmanuel commented 6 months ago

@ekohl, @evgeni any feedback on the request?

evgeni commented 6 months ago

The request is valid, we just didn't have time to think about it further.

laugmanuel commented 6 months ago

@evgeni I've prepared a PR for this feature. It looks a bit hacky as I didn't find another way of passing information from caller to the reusable workflow. Passing env directly is a limitation stated here: https://docs.github.com/en/actions/using-workflows/reusing-workflows#limitations