Ability to use variable service "container" values

Hey there,

I am evaluating github actions for my organization.
Here’s the following scenario that I have:

  1. I build an image with a specific tag and I push it to my docker registry
  2. Then in a subsequent step, I want to use that particular image, and refer to it with a variable by using jobs.<job_id>.container.image in a way similar to this:
    container:
      image: ci-env-frontend:${{ needs.PreviousJob.outputs.timestamp }}
    

This doesn’t seem to work. I see in the Actions logs that whatever I put in the value of the image key, that is either evaluated literally, or as an empty string. In general, env vars and output values from previous jobs seems to be inaccessible in jobs.<job_id>.container.image

I also found this topic: How to use env with container/image? - #17 by dimisjim

Is there any way around this?
Thanks in advance

This is likely one of the keys that only accepts literal values, just like uses only accepts hard-coded actions for security reasons: Workflows are checked for actions that are disallowed before they are run, so the values cannot be dynamic as that would require to evaluate at least parts of the workflow before it can be determined (or workflows would need to be aborted at runtime as soon as a disallowed action is encountered, but that could cost you money).

You could try to run Docker manually, though, like docker run ... in a run: ... step.