Given I have the following variable in my Github repository
MYVAR: My Var
Then I have this part that is executed in Github Actions:
if then... // conditionally setting some variables
MYVAR = ${{vars.MYVAR}}
docker run
-d
-e MYVAR=$MYVAR // error triggered here
ghcr.io/xxx/xxx/:${{github.sha}}-${{github.ref_name}}
But I get the following error during workflow run:
err: bash: line 3: Test: command not found
An odd thing:
If using github secrets I can simply escape the space character
My Var
and then docker won’t complain.
3