Issue
I'm trying to set a env variable based on another env variable in a github workflow. I've tried a couple of syntax options but none seem to work
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
env:
BASE_VERSION: 1.0.0
FULL_VERSION: ${BASE_VERSION}-${{ github.run_number }}-${{ github.ref_name }}
jobs:
- The example for BASE_VERSION above just keeps ${BASE_VERSION} as a string
- $BASE_VERSION also just keeps $BASE_VERSION as a string
- ${{ env.BASE_VERSION }}-blabla just fails with syntax error
Is this doable?
The output I want is "1.0.0-1-master" for example
Solution
Is this doable?
It does not seem like a supported behaviour at the moment.
The docs on env
mentions that
variables in the
env
map cannot be defined in terms of other variables in the map.
Answered By - lyzlisa Answer Checked By - Terry (PHPFixing Volunteer)
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.