-
I’m trying to pass an ${{ expression }} inside a Docker URI in my workflow, as such:
Result is the error:
As an alternative, I’ve tried:
Result is the error:
Has anyone succesfully used expressions this way? Thanks! |
Beta Was this translation helpful? Give feedback.
Replies: 8 comments
-
I was able to run it using:
However, it would be great to support uses: ‘docker://${{ steps.previous_step.outputs.image }}’ directly and be able to set Docker environment variables as properties of this step, etc. |
Beta Was this translation helpful? Give feedback.
-
I had this exact problem without finding a solution. I will try the workaround but I would still like to know if this is a deliberate design decision, and the reasons in that case. |
Beta Was this translation helpful? Give feedback.
-
Actually my use case is the proposed workaround from the OP: having the action take a parameter which is the dockerhub image name. |
Beta Was this translation helpful? Give feedback.
-
We currently do not support expressions in the uses tag in order to to know which repos we need to pull down as we are processing the job. We also have a feature that limits the usage of third party actions and if actions are defined as an expression we would not be able to block that before the job starts on the runner. |
Beta Was this translation helpful? Give feedback.
-
Hello @chrispat , thanks for the clarification. In my use case the action is statically given and the expression is in the |
Beta Was this translation helpful? Give feedback.
-
Lack of support for expressions in the “uses” tag imposes quite an inconvenience for docker-based actions. Would it be possible to specify a path to a Dockerfile using an expression in the |
Beta Was this translation helpful? Give feedback.
-
I also would like to be able to use the
syntax. |
Beta Was this translation helpful? Give feedback.
-
I created this action as a workaround for this use case. I’m using it since some time successfully. |
Beta Was this translation helpful? Give feedback.
We currently do not support expressions in the uses tag in order to to know which repos we need to pull down as we are processing the job. We also have a feature that limits the usage of third party actions and if actions are defined as an expression we would not be able to block that before the job starts on the runner.