I have a github repository like the following
johndoe/hello-world
I am trying to set the following environment variables in github actions
env:
DOCKER_HUB_USERID: ${{ github.actor }}
REPOSITORY_NAME: ${GITHUB_REPOSITORY#*\/}
IMAGE_NAME_CLIENT: "$REPOSITORY_NAME-client"
IMAGE_NAME_SERVER: "$REPOSITORY_NAME-server"
My expected results for these variables are:
johndoe
hello-world
hello-world-client
hello-world-server
But i am getting
johndoe
${REPOSITORY_NAME#*\/}
$REPOSITORY_NAME-client
$REPOSITORY_NAME-server
Looks like the expressions are not being evaluated while declaring the env
vars.
How can I achieve the expected behavior?
${{github.repository}}
, similar to the first one that works? It looks like from here that would work. – Coston${{github.repository}}
includes the username... i want to get it without the username – Seminole