I have created a new environment in GitHub and created a new env var with Oktokit, Now I want to use this variable in a yml workflow file I read the documentation but I couldn t really understand what am I doing wrong.
The official documentation says the following this:
on:
workflow_dispatch:
env:
# Setting an environment variable with the value of a configuration variable
env_var: ${{ vars.ENV_CONTEXT_VAR }}
Now, my code looks like this:
on:
workflow_dispatch:
env:
# Setting an environment variable with the value of a configuration variable
last_automated_release: ${{ vars.LAST_AUTOMATED_RELEASE }}
....
- name: Echo env var
run: |
echo "variable from shell environment: $last_automated_release"
echo "variable from shell1 environment: ${{ env.last_automated_release }}"
No matter what I receive an empty string in the CI
I know the variable contains data:
What am I doing wrong?