I’m trying to use the value of an environment variable, and neither one of these approaches is working for me, since the variable is not being expanded:
Global env section:
env:
HOSTNAME: "${{ vars.HOSTNAME }}"
STAGE_NAME: "${{ vars.STAGE_NAME }}"
Approach one:
working-directory: /var/www/${{ env.HOSTNAME }}/releases
Approach two:
run: |
cd /var/www/${{ env.HOSTNAME }}/releases
How do I properly reference the ‘env.HOSTNAME’ variable in each of these cases?