How to combine multiple 'uses' in github actions? #26579
-
I find myself repeating these three lines.
How can I combine these three ? In the composite action, “uses” is not allowed… |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments
-
You can’t. A step can only run one action or task at a time. So you have to list them out separately. |
Beta Was this translation helpful? Give feedback.
-
If GitHub Actions supports the fully YAML specification, try Anchors: https://medium.com/@kinghuang/docker-compose-anchors-aliases-extensions-a1e4105d70bd stackoverflow.comYAML how to reuse single string content
yaml
asked by
Arnold Roa
on 03:23AM - 23 Feb 18 UTC
I suppose you could specify the list once at the top and then recall it in every job in the same file |
Beta Was this translation helpful? Give feedback.
-
Right now the GitHub Actions YAML doesn’t support anchors. |
Beta Was this translation helpful? Give feedback.
You can’t. A step can only run one action or task at a time. So you have to list them out separately.