yaml expression syntax #25557
-
The documentation of expressions in yaml is… not leaving me with the feeling that I know what I’m doing. Here’s what I want:
I have tried at least a dozen ways to do this - with join() expressions, with stage.output constructrs… nothing seems to work. What would be really useful is a complex, well documented YAML file that exercises many of the things that people might want to use… |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
Thank you for your suggestion. If you want to use VERSION environment variable in NAME , I would suggest you use ${{env.VERSION}} instead of $VERSION in step.env. Please check my example: jobs: job1: runs-on: ubuntu-latest env: VERSION: ${{ ‘0.2’ }}
steps: - uses: actions/checkout@v1 - run: echo ‘version’ $VERSION ‘name’ $NAME env: NAME: subsurface/mxe-build-container:${{env.VERSION}}.stage1 There is a similar issue for how to use env context:https://github.community/t5/GitHub-Actions/How-to-use-env-context/td-p/38951 I have submitted a suggestion to appropriate engineering team . Ask them to make it clear and add some examples for using env context to this document. |
Beta Was this translation helpful? Give feedback.
Thank you for your suggestion.
If you want to use VERSION environment variable in NAME , I would suggest you use ${{env.VERSION}} instead of $VERSION in step.env. Please check my example:
jobs:
job1:
runs-on: ubuntu-latest
env:
VERSION: ${{ ‘0.2’ }}
steps:
- uses: actions/checkout@v1
- run: echo ‘version’ $VERSION ‘name’ $NAME
env:
NAME: subsurface/mxe-build-container:${{env.VERSION}}.stage1
There is a similar issue for how to use env context:https://github.community/t5/GitHub-Actions/How-to-use-env-context/td-p/38951
I have submitted a suggestion to appropriate engineering team . Ask them to make it clear and add some examples for usin…