I would like to set env variables depending on the branch. I have two branches 'master', and 'develop'. In each case I would like to define the following workflow env varialbes:
# for the master branch
env:
host: test.example.com
compose_file: docker-compose.staging.yml
# for the develop branch
env:
host: api.example.com
compose_file: docker-compose.prod.yml
How can I do that?
Currently I have two files which are copies of each other, with only the env variables changed.
I've seen that you can use ${{}}
to evaluate expression. Is that the way to go?