Expression parsing in 'runs.image' yaml value. #38311
Replies: 4 comments 3 replies
-
I was able to work-around this issue by wrapping my |
Beta Was this translation helpful? Give feedback.
-
Another update: A composite action actually does not work optimally, as an error will be thrown if the image does not exist at the start of the run. The solution to this is to pull & tag the image in a separate, precursor, job. |
Beta Was this translation helpful? Give feedback.
-
That will only work if both jobs run on the same self-hosted runner. GitHub hosted runners are discarded after each job. And if you have multiple self-hosted runners a different one might pick up the second job, and then you get a different image than expected, or maybe it's missing anyway. How about calling |
Beta Was this translation helpful? Give feedback.
-
Ok, ultimately, I was able to work around my problem by having the |
Beta Was this translation helpful? Give feedback.
-
I am running on GitHub Enterprise Server 3.3.6 and have run into a bit of a snag when creating a docker action.
Essentially, I would like to be able to dynamically pull a different base image depending on what inputs are passed in but unfortunately it seems that expressions in the
runs.image
yaml value are not expanded.Here is an example:
Unfortunately, this results in docker trying to pull the image
docker://${{ inputs.container }}
, and failing. Using environment variables does not work either.This seems like a massive limitation on the flexibility of Docker actions.
Is the functionality I need present on the latest version of GHES?
Is there a way to work around this?
There is no way to pass
build-arg
's into aDockerfile
either, so that won't work either.Beta Was this translation helpful? Give feedback.
All reactions