3 ms·
> 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 ab
by mdaniel 7y ago
> 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
- satyadeepk 7y agoLooks like YAML anchors and aliases are not currently supported. https://github.community/t5/GitHub-Actions/Support-for-YAML-anchors/td-p/30336 https://github.community/t5/GitHub-Actions/Support-for-YAML-...