ci: Add UI inputs for Update helm charts
job
#399
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
Fix #307.
Add UI inputs when workflow triggered as
workflow_dispatch
.Given that the values can come from
repository_dispatch
(other repos) orworkflow_dispatch
(UI button), add a newsetvariables
job, that sets its job outputs to the corresponding values obtained from the payload of the repository_dispatch or from the inputs of the workflow_dispatch.It is needed to use job outputs as is the only way to pass values between jobs, as jobs are run in their own VM instances and don't share the env.
Make the following jobs depend on it with
needs: setvariables
.The javascript script from actions/github-script cannot read job outputs. Hence, add a step that reads the
needs.setvariables.outputs
and creates env vars. Consume those env vars in js asprocess.env.foo
.Test
Tested manually from my fork, to the point that the job tries to download the crds asset, where it fails.
See: https://github.com/viccuad/helm-charts/actions/runs/8252069909
Additional Information
Tradeoff
Potential improvement
I don't like the amount of complexity this adds to this workflow.