Rename `actions/foo` to `actions.foo`?
There are an increasing number of record keys of the form actions/foo. This gives a quasi-namespacing effect but maybe we want to push them into a separate record, since AFAIK we can't assemble record keys from Text or anything.
Should we have actions = { setup-haskell = ..., setup-java = ... } etc instead?
A normalization would be very beneficial as we add more actions I'm pushing forward versioned actions
let step : ∀(ref : Text) → ∀(opts : Input.Type) → GithubActions.Step.Type
{- [...] -}
let `v1.8.0` = "f3364599c6aa293cdc2b8391b1b56d0c30e45c8a"
in { `v1.8.0` = step `v1.8.0`, step }
see https://github.com/SocialGouv/.github/blob/d77a500804bb164021edefb85b2de0da13a6c945/dhall/steps/docker/login-action/action.dhall#L56-L64
This might be another topic 🤔
I don't want to rearrange the namespace if we'll end up wanting to rearrange it again, so it's probably worth talking about it now, at least for a little while. I find your example a little surprising as I'd expect actions.docker.login-action.`v1.8.0` to generate docker/[email protected], but it looks like it's splicing in an explicit git ref?
The design principles I'm thinking about lead me to a question:
-
.steps.actions.fooshould be a function taking arguments that match the action, generating a.Step.Type - It might be nice to have a way to support "alternate" versions of actions, in case migration between two action major versions becomes difficult
- The obvious place to put these would be
.steps.actions.foo.`vX.Y.Z`. - This means we'd need
.steps.actions.foo.defaultor something, because.steps.actions.fooneeds to be a record. - Do we get enough value from (4) to make everyone type
.defaulton every other step, most of the time? If the default version of a step is unsuitable, then the programmer can always write a raw.Step::{ ... }.
I think that if we agree on an answer to (5), we get a good answer for how to proceed. Might be good if @regadas is able to weigh in, but he might be busy.