> Environment variables can only be defined on steps, they can't be defined at a job level. So the same code has to be repeated in each step.
I haven't been able to play with Actions to confirm what I'm about to say, but if they use a fully compliant YAML parser you can use YAML anchors to do "copy-paste" without the copy paste; I think GitLab actually fully recommended such an approach before they supported `extends:` in their pipeline document
I'm on my phone or I would link to the YAML spec and GitLab examples in their docs for the gory details
I haven't been able to play with Actions to confirm what I'm about to say, but if they use a fully compliant YAML parser you can use YAML anchors to do "copy-paste" without the copy paste; I think GitLab actually fully recommended such an approach before they supported `extends:` in their pipeline document
I'm on my phone or I would link to the YAML spec and GitLab examples in their docs for the gory details